var Rm=e=>{throw TypeError(e)};var Fu=(e,t,r)=>t.has(e)||Rm("Cannot "+r);var O=(e,t,r)=>(Fu(e,t,"read from private field"),r?r.call(e):t.get(e)),Se=(e,t,r)=>t.has(e)?Rm("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ne=(e,t,r,s)=>(Fu(e,t,"write to private field"),s?s.call(e,r):t.set(e,r),r),Ae=(e,t,r)=>(Fu(e,t,"access private method"),r);var qa=(e,t,r,s)=>({set _(a){ne(e,t,a,r)},get _(){return O(e,t,s)}});function H1(e,t){for(var r=0;rs[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))s(a);new MutationObserver(a=>{for(const l of a)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&s(u)}).observe(document,{childList:!0,subtree:!0});function r(a){const l={};return a.integrity&&(l.integrity=a.integrity),a.referrerPolicy&&(l.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?l.credentials="include":a.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(a){if(a.ep)return;a.ep=!0;const l=r(a);fetch(a.href,l)}})();function ef(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Uu={exports:{}},ri={},Bu={exports:{}},Pe={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Nm;function W1(){if(Nm)return Pe;Nm=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.iterator;function C(L){return L===null||typeof L!="object"?null:(L=y&&L[y]||L["@@iterator"],typeof L=="function"?L:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,v={};function S(L,W,we){this.props=L,this.context=W,this.refs=v,this.updater=we||k}S.prototype.isReactComponent={},S.prototype.setState=function(L,W){if(typeof L!="object"&&typeof L!="function"&&L!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,L,W,"setState")},S.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function R(){}R.prototype=S.prototype;function P(L,W,we){this.props=L,this.context=W,this.refs=v,this.updater=we||k}var N=P.prototype=new R;N.constructor=P,E(N,S.prototype),N.isPureReactComponent=!0;var A=Array.isArray,D=Object.prototype.hasOwnProperty,V={current:null},H={key:!0,ref:!0,__self:!0,__source:!0};function U(L,W,we){var ye,pe={},ge=null,Z=null;if(W!=null)for(ye in W.ref!==void 0&&(Z=W.ref),W.key!==void 0&&(ge=""+W.key),W)D.call(W,ye)&&!H.hasOwnProperty(ye)&&(pe[ye]=W[ye]);var me=arguments.length-2;if(me===1)pe.children=we;else if(1>>1,W=$[L];if(0>>1;La(pe,z))gea(Z,pe)?($[L]=Z,$[ge]=z,L=ge):($[L]=pe,$[ye]=z,L=ye);else if(gea(Z,z))$[L]=Z,$[ge]=z,L=ge;else break e}}return G}function a($,G){var z=$.sortIndex-G.sortIndex;return z!==0?z:$.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var u=Date,d=u.now();e.unstable_now=function(){return u.now()-d}}var h=[],m=[],g=1,y=null,C=3,k=!1,E=!1,v=!1,S=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function N($){for(var G=r(m);G!==null;){if(G.callback===null)s(m);else if(G.startTime<=$)s(m),G.sortIndex=G.expirationTime,t(h,G);else break;G=r(m)}}function A($){if(v=!1,N($),!E)if(r(h)!==null)E=!0,J(D);else{var G=r(m);G!==null&&se(A,G.startTime-$)}}function D($,G){E=!1,v&&(v=!1,R(U),U=-1),k=!0;var z=C;try{for(N(G),y=r(h);y!==null&&(!(y.expirationTime>G)||$&&!ee());){var L=y.callback;if(typeof L=="function"){y.callback=null,C=y.priorityLevel;var W=L(y.expirationTime<=G);G=e.unstable_now(),typeof W=="function"?y.callback=W:y===r(h)&&s(h),N(G)}else s(h);y=r(h)}if(y!==null)var we=!0;else{var ye=r(m);ye!==null&&se(A,ye.startTime-G),we=!1}return we}finally{y=null,C=z,k=!1}}var V=!1,H=null,U=-1,X=5,re=-1;function ee(){return!(e.unstable_now()-re$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):X=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return C},e.unstable_getFirstCallbackNode=function(){return r(h)},e.unstable_next=function($){switch(C){case 1:case 2:case 3:var G=3;break;default:G=C}var z=C;C=G;try{return $()}finally{C=z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function($,G){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var z=C;C=$;try{return G()}finally{C=z}},e.unstable_scheduleCallback=function($,G,z){var L=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0L?($.sortIndex=z,t(m,$),r(h)===null&&$===r(m)&&(v?(R(U),U=-1):v=!0,se(A,z-L))):($.sortIndex=W,t(h,$),E||k||(E=!0,J(D))),$},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function($){var G=C;return function(){var z=C;C=G;try{return $.apply(this,arguments)}finally{C=z}}}})(Vu)),Vu}var jm;function Y1(){return jm||(jm=1,$u.exports=Q1()),$u.exports}/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Lm;function X1(){if(Lm)return Ot;Lm=1;var e=tf(),t=Y1();function r(n){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+n,i=1;i"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,m=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,g={},y={};function C(n){return h.call(y,n)?!0:h.call(g,n)?!1:m.test(n)?y[n]=!0:(g[n]=!0,!1)}function k(n,o,i,c){if(i!==null&&i.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return c?!1:i!==null?!i.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function E(n,o,i,c){if(o===null||typeof o>"u"||k(n,o,i,c))return!0;if(c)return!1;if(i!==null)switch(i.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function v(n,o,i,c,f,p,w){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=c,this.attributeNamespace=f,this.mustUseProperty=i,this.propertyName=n,this.type=o,this.sanitizeURL=p,this.removeEmptyString=w}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){S[n]=new v(n,0,!1,n,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var o=n[0];S[o]=new v(o,1,!1,n[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(n){S[n]=new v(n,2,!1,n.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){S[n]=new v(n,2,!1,n,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(n){S[n]=new v(n,3,!1,n.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(n){S[n]=new v(n,3,!0,n,null,!1,!1)}),["capture","download"].forEach(function(n){S[n]=new v(n,4,!1,n,null,!1,!1)}),["cols","rows","size","span"].forEach(function(n){S[n]=new v(n,6,!1,n,null,!1,!1)}),["rowSpan","start"].forEach(function(n){S[n]=new v(n,5,!1,n.toLowerCase(),null,!1,!1)});var R=/[\-:]([a-z])/g;function P(n){return n[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(n){var o=n.replace(R,P);S[o]=new v(o,1,!1,n,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var o=n.replace(R,P);S[o]=new v(o,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(n){var o=n.replace(R,P);S[o]=new v(o,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(n){S[n]=new v(n,1,!1,n.toLowerCase(),null,!1,!1)}),S.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(n){S[n]=new v(n,1,!1,n.toLowerCase(),null,!0,!0)});function N(n,o,i,c){var f=S.hasOwnProperty(o)?S[o]:null;(f!==null?f.type!==0:c||!(2_||f[w]!==p[_]){var T=` `+f[w].replace(" at new "," at ");return n.displayName&&T.includes("")&&(T=T.replace("",n.displayName)),T}while(1<=w&&0<=_);break}}}finally{we=!1,Error.prepareStackTrace=i}return(n=n?n.displayName||n.name:"")?W(n):""}function pe(n){switch(n.tag){case 5:return W(n.type);case 16:return W("Lazy");case 13:return W("Suspense");case 19:return W("SuspenseList");case 0:case 2:case 15:return n=ye(n.type,!1),n;case 11:return n=ye(n.type.render,!1),n;case 1:return n=ye(n.type,!0),n;default:return""}}function ge(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case H:return"Fragment";case V:return"Portal";case X:return"Profiler";case U:return"StrictMode";case ve:return"Suspense";case ue:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case ee:return(n.displayName||"Context")+".Consumer";case re:return(n._context.displayName||"Context")+".Provider";case he:var o=n.render;return n=n.displayName,n||(n=o.displayName||o.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case Ee:return o=n.displayName||null,o!==null?o:ge(n.type)||"Memo";case J:o=n._payload,n=n._init;try{return ge(n(o))}catch{}}return null}function Z(n){var o=n.type;switch(n.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=o.render,n=n.displayName||n.name||"",o.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ge(o);case 8:return o===U?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function me(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function de(n){var o=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function _e(n){var o=de(n)?"checked":"value",i=Object.getOwnPropertyDescriptor(n.constructor.prototype,o),c=""+n[o];if(!n.hasOwnProperty(o)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var f=i.get,p=i.set;return Object.defineProperty(n,o,{configurable:!0,get:function(){return f.call(this)},set:function(w){c=""+w,p.call(this,w)}}),Object.defineProperty(n,o,{enumerable:i.enumerable}),{getValue:function(){return c},setValue:function(w){c=""+w},stopTracking:function(){n._valueTracker=null,delete n[o]}}}}function Ne(n){n._valueTracker||(n._valueTracker=_e(n))}function Te(n){if(!n)return!1;var o=n._valueTracker;if(!o)return!0;var i=o.getValue(),c="";return n&&(c=de(n)?n.checked?"true":"false":n.value),n=c,n!==i?(o.setValue(n),!0):!1}function Ke(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function ot(n,o){var i=o.checked;return z({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:i??n._wrapperState.initialChecked})}function Kn(n,o){var i=o.defaultValue==null?"":o.defaultValue,c=o.checked!=null?o.checked:o.defaultChecked;i=me(o.value!=null?o.value:i),n._wrapperState={initialChecked:c,initialValue:i,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function Qn(n,o){o=o.checked,o!=null&&N(n,"checked",o,!1)}function An(n,o){Qn(n,o);var i=me(o.value),c=o.type;if(i!=null)c==="number"?(i===0&&n.value===""||n.value!=i)&&(n.value=""+i):n.value!==""+i&&(n.value=""+i);else if(c==="submit"||c==="reset"){n.removeAttribute("value");return}o.hasOwnProperty("value")?Yn(n,o.type,i):o.hasOwnProperty("defaultValue")&&Yn(n,o.type,me(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(n.defaultChecked=!!o.defaultChecked)}function Di(n,o,i){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var c=o.type;if(!(c!=="submit"&&c!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+n._wrapperState.initialValue,i||o===n.value||(n.value=o),n.defaultValue=o}i=n.name,i!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,i!==""&&(n.name=i)}function Yn(n,o,i){(o!=="number"||Ke(n.ownerDocument)!==n)&&(i==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+i&&(n.defaultValue=""+i))}var vs=Array.isArray;function xo(n,o,i,c){if(n=n.options,o){o={};for(var f=0;f"+o.valueOf().toString()+"",o=Fi.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;o.firstChild;)n.appendChild(o.firstChild)}});function ws(n,o){if(o){var i=n.firstChild;if(i&&i===n.lastChild&&i.nodeType===3){i.nodeValue=o;return}}n.textContent=o}var xs={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Qw=["Webkit","ms","Moz","O"];Object.keys(xs).forEach(function(n){Qw.forEach(function(o){o=o+n.charAt(0).toUpperCase()+n.substring(1),xs[o]=xs[n]})});function $f(n,o,i){return o==null||typeof o=="boolean"||o===""?"":i||typeof o!="number"||o===0||xs.hasOwnProperty(n)&&xs[n]?(""+o).trim():o+"px"}function Vf(n,o){n=n.style;for(var i in o)if(o.hasOwnProperty(i)){var c=i.indexOf("--")===0,f=$f(i,o[i],c);i==="float"&&(i="cssFloat"),c?n.setProperty(i,f):n[i]=f}}var Yw=z({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Xl(n,o){if(o){if(Yw[n]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(r(137,n));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(r(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(r(61))}if(o.style!=null&&typeof o.style!="object")throw Error(r(62))}}function Gl(n,o){if(n.indexOf("-")===-1)return typeof o.is=="string";switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Jl=null;function Zl(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var ec=null,bo=null,So=null;function Hf(n){if(n=$s(n)){if(typeof ec!="function")throw Error(r(280));var o=n.stateNode;o&&(o=aa(o),ec(n.stateNode,n.type,o))}}function Wf(n){bo?So?So.push(n):So=[n]:bo=n}function qf(){if(bo){var n=bo,o=So;if(So=bo=null,Hf(n),o)for(n=0;n>>=0,n===0?32:31-(ix(n)/ax|0)|0}var Vi=64,Hi=4194304;function Cs(n){switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function Wi(n,o){var i=n.pendingLanes;if(i===0)return 0;var c=0,f=n.suspendedLanes,p=n.pingedLanes,w=i&268435455;if(w!==0){var _=w&~f;_!==0?c=Cs(_):(p&=w,p!==0&&(c=Cs(p)))}else w=i&~f,w!==0?c=Cs(w):p!==0&&(c=Cs(p));if(c===0)return 0;if(o!==0&&o!==c&&(o&f)===0&&(f=c&-c,p=o&-o,f>=p||f===16&&(p&4194240)!==0))return o;if((c&4)!==0&&(c|=i&16),o=n.entangledLanes,o!==0)for(n=n.entanglements,o&=c;0i;i++)o.push(n);return o}function ks(n,o,i){n.pendingLanes|=o,o!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,o=31-tn(o),n[o]=i}function dx(n,o){var i=n.pendingLanes&~o;n.pendingLanes=o,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=o,n.mutableReadLanes&=o,n.entangledLanes&=o,o=n.entanglements;var c=n.eventTimes;for(n=n.expirationTimes;0=js),xh=" ",bh=!1;function Sh(n,o){switch(n){case"keyup":return Ux.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Eh(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var ko=!1;function zx(n,o){switch(n){case"compositionend":return Eh(o);case"keypress":return o.which!==32?null:(bh=!0,xh);case"textInput":return n=o.data,n===xh&&bh?null:n;default:return null}}function $x(n,o){if(ko)return n==="compositionend"||!vc&&Sh(n,o)?(n=ph(),Xi=fc=er=null,ko=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1=o)return{node:i,offset:o-n};n=c}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Th(i)}}function Oh(n,o){return n&&o?n===o?!0:n&&n.nodeType===3?!1:o&&o.nodeType===3?Oh(n,o.parentNode):"contains"in n?n.contains(o):n.compareDocumentPosition?!!(n.compareDocumentPosition(o)&16):!1:!1}function jh(){for(var n=window,o=Ke();o instanceof n.HTMLIFrameElement;){try{var i=typeof o.contentWindow.location.href=="string"}catch{i=!1}if(i)n=o.contentWindow;else break;o=Ke(n.document)}return o}function bc(n){var o=n&&n.nodeName&&n.nodeName.toLowerCase();return o&&(o==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||o==="textarea"||n.contentEditable==="true")}function Gx(n){var o=jh(),i=n.focusedElem,c=n.selectionRange;if(o!==i&&i&&i.ownerDocument&&Oh(i.ownerDocument.documentElement,i)){if(c!==null&&bc(i)){if(o=c.start,n=c.end,n===void 0&&(n=o),"selectionStart"in i)i.selectionStart=o,i.selectionEnd=Math.min(n,i.value.length);else if(n=(o=i.ownerDocument||document)&&o.defaultView||window,n.getSelection){n=n.getSelection();var f=i.textContent.length,p=Math.min(c.start,f);c=c.end===void 0?p:Math.min(c.end,f),!n.extend&&p>c&&(f=c,c=p,p=f),f=Ah(i,p);var w=Ah(i,c);f&&w&&(n.rangeCount!==1||n.anchorNode!==f.node||n.anchorOffset!==f.offset||n.focusNode!==w.node||n.focusOffset!==w.offset)&&(o=o.createRange(),o.setStart(f.node,f.offset),n.removeAllRanges(),p>c?(n.addRange(o),n.extend(w.node,w.offset)):(o.setEnd(w.node,w.offset),n.addRange(o)))}}for(o=[],n=i;n=n.parentNode;)n.nodeType===1&&o.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof i.focus=="function"&&i.focus(),i=0;i=document.documentMode,_o=null,Sc=null,Ds=null,Ec=!1;function Lh(n,o,i){var c=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Ec||_o==null||_o!==Ke(c)||(c=_o,"selectionStart"in c&&bc(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Ds&&Ms(Ds,c)||(Ds=c,c=oa(Sc,"onSelect"),0Ao||(n.current=Ic[Ao],Ic[Ao]=null,Ao--)}function Be(n,o){Ao++,Ic[Ao]=n.current,n.current=o}var or={},yt=rr(or),Rt=rr(!1),Ur=or;function Oo(n,o){var i=n.type.contextTypes;if(!i)return or;var c=n.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===o)return c.__reactInternalMemoizedMaskedChildContext;var f={},p;for(p in i)f[p]=o[p];return c&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=o,n.__reactInternalMemoizedMaskedChildContext=f),f}function Nt(n){return n=n.childContextTypes,n!=null}function la(){$e(Rt),$e(yt)}function Yh(n,o,i){if(yt.current!==or)throw Error(r(168));Be(yt,o),Be(Rt,i)}function Xh(n,o,i){var c=n.stateNode;if(o=o.childContextTypes,typeof c.getChildContext!="function")return i;c=c.getChildContext();for(var f in c)if(!(f in o))throw Error(r(108,Z(n)||"Unknown",f));return z({},i,c)}function ca(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||or,Ur=yt.current,Be(yt,n),Be(Rt,Rt.current),!0}function Gh(n,o,i){var c=n.stateNode;if(!c)throw Error(r(169));i?(n=Xh(n,o,Ur),c.__reactInternalMemoizedMergedChildContext=n,$e(Rt),$e(yt),Be(yt,n)):$e(Rt),Be(Rt,i)}var jn=null,ua=!1,Mc=!1;function Jh(n){jn===null?jn=[n]:jn.push(n)}function c1(n){ua=!0,Jh(n)}function sr(){if(!Mc&&jn!==null){Mc=!0;var n=0,o=Fe;try{var i=jn;for(Fe=1;n>=w,f-=w,Ln=1<<32-tn(o)+f|i<ke?(ut=be,be=null):ut=be.sibling;var Me=q(I,be,M[ke],Y);if(Me===null){be===null&&(be=ut);break}n&&be&&Me.alternate===null&&o(I,be),j=p(Me,j,ke),xe===null?fe=Me:xe.sibling=Me,xe=Me,be=ut}if(ke===M.length)return i(I,be),Ve&&zr(I,ke),fe;if(be===null){for(;keke?(ut=be,be=null):ut=be.sibling;var pr=q(I,be,Me.value,Y);if(pr===null){be===null&&(be=ut);break}n&&be&&pr.alternate===null&&o(I,be),j=p(pr,j,ke),xe===null?fe=pr:xe.sibling=pr,xe=pr,be=ut}if(Me.done)return i(I,be),Ve&&zr(I,ke),fe;if(be===null){for(;!Me.done;ke++,Me=M.next())Me=Q(I,Me.value,Y),Me!==null&&(j=p(Me,j,ke),xe===null?fe=Me:xe.sibling=Me,xe=Me);return Ve&&zr(I,ke),fe}for(be=c(I,be);!Me.done;ke++,Me=M.next())Me=te(be,I,ke,Me.value,Y),Me!==null&&(n&&Me.alternate!==null&&be.delete(Me.key===null?ke:Me.key),j=p(Me,j,ke),xe===null?fe=Me:xe.sibling=Me,xe=Me);return n&&be.forEach(function(V1){return o(I,V1)}),Ve&&zr(I,ke),fe}function Je(I,j,M,Y){if(typeof M=="object"&&M!==null&&M.type===H&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case D:e:{for(var fe=M.key,xe=j;xe!==null;){if(xe.key===fe){if(fe=M.type,fe===H){if(xe.tag===7){i(I,xe.sibling),j=f(xe,M.props.children),j.return=I,I=j;break e}}else if(xe.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===J&&op(fe)===xe.type){i(I,xe.sibling),j=f(xe,M.props),j.ref=Vs(I,xe,M),j.return=I,I=j;break e}i(I,xe);break}else o(I,xe);xe=xe.sibling}M.type===H?(j=Yr(M.props.children,I.mode,Y,M.key),j.return=I,I=j):(Y=Fa(M.type,M.key,M.props,null,I.mode,Y),Y.ref=Vs(I,j,M),Y.return=I,I=Y)}return w(I);case V:e:{for(xe=M.key;j!==null;){if(j.key===xe)if(j.tag===4&&j.stateNode.containerInfo===M.containerInfo&&j.stateNode.implementation===M.implementation){i(I,j.sibling),j=f(j,M.children||[]),j.return=I,I=j;break e}else{i(I,j);break}else o(I,j);j=j.sibling}j=ju(M,I.mode,Y),j.return=I,I=j}return w(I);case J:return xe=M._init,Je(I,j,xe(M._payload),Y)}if(vs(M))return ie(I,j,M,Y);if(G(M))return ce(I,j,M,Y);pa(I,M)}return typeof M=="string"&&M!==""||typeof M=="number"?(M=""+M,j!==null&&j.tag===6?(i(I,j.sibling),j=f(j,M),j.return=I,I=j):(i(I,j),j=Ou(M,I.mode,Y),j.return=I,I=j),w(I)):i(I,j)}return Je}var Mo=sp(!0),ip=sp(!1),ma=rr(null),ga=null,Do=null,$c=null;function Vc(){$c=Do=ga=null}function Hc(n){var o=ma.current;$e(ma),n._currentValue=o}function Wc(n,o,i){for(;n!==null;){var c=n.alternate;if((n.childLanes&o)!==o?(n.childLanes|=o,c!==null&&(c.childLanes|=o)):c!==null&&(c.childLanes&o)!==o&&(c.childLanes|=o),n===i)break;n=n.return}}function Fo(n,o){ga=n,$c=Do=null,n=n.dependencies,n!==null&&n.firstContext!==null&&((n.lanes&o)!==0&&(Pt=!0),n.firstContext=null)}function qt(n){var o=n._currentValue;if($c!==n)if(n={context:n,memoizedValue:o,next:null},Do===null){if(ga===null)throw Error(r(308));Do=n,ga.dependencies={lanes:0,firstContext:n}}else Do=Do.next=n;return o}var $r=null;function qc(n){$r===null?$r=[n]:$r.push(n)}function ap(n,o,i,c){var f=o.interleaved;return f===null?(i.next=i,qc(o)):(i.next=f.next,f.next=i),o.interleaved=i,Mn(n,c)}function Mn(n,o){n.lanes|=o;var i=n.alternate;for(i!==null&&(i.lanes|=o),i=n,n=n.return;n!==null;)n.childLanes|=o,i=n.alternate,i!==null&&(i.childLanes|=o),i=n,n=n.return;return i.tag===3?i.stateNode:null}var ir=!1;function Kc(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function lp(n,o){n=n.updateQueue,o.updateQueue===n&&(o.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,effects:n.effects})}function Dn(n,o){return{eventTime:n,lane:o,tag:0,payload:null,callback:null,next:null}}function ar(n,o,i){var c=n.updateQueue;if(c===null)return null;if(c=c.shared,(Ie&2)!==0){var f=c.pending;return f===null?o.next=o:(o.next=f.next,f.next=o),c.pending=o,Mn(n,i)}return f=c.interleaved,f===null?(o.next=o,qc(c)):(o.next=f.next,f.next=o),c.interleaved=o,Mn(n,i)}function ya(n,o,i){if(o=o.updateQueue,o!==null&&(o=o.shared,(i&4194240)!==0)){var c=o.lanes;c&=n.pendingLanes,i|=c,o.lanes=i,ac(n,i)}}function cp(n,o){var i=n.updateQueue,c=n.alternate;if(c!==null&&(c=c.updateQueue,i===c)){var f=null,p=null;if(i=i.firstBaseUpdate,i!==null){do{var w={eventTime:i.eventTime,lane:i.lane,tag:i.tag,payload:i.payload,callback:i.callback,next:null};p===null?f=p=w:p=p.next=w,i=i.next}while(i!==null);p===null?f=p=o:p=p.next=o}else f=p=o;i={baseState:c.baseState,firstBaseUpdate:f,lastBaseUpdate:p,shared:c.shared,effects:c.effects},n.updateQueue=i;return}n=i.lastBaseUpdate,n===null?i.firstBaseUpdate=o:n.next=o,i.lastBaseUpdate=o}function va(n,o,i,c){var f=n.updateQueue;ir=!1;var p=f.firstBaseUpdate,w=f.lastBaseUpdate,_=f.shared.pending;if(_!==null){f.shared.pending=null;var T=_,F=T.next;T.next=null,w===null?p=F:w.next=F,w=T;var K=n.alternate;K!==null&&(K=K.updateQueue,_=K.lastBaseUpdate,_!==w&&(_===null?K.firstBaseUpdate=F:_.next=F,K.lastBaseUpdate=T))}if(p!==null){var Q=f.baseState;w=0,K=F=T=null,_=p;do{var q=_.lane,te=_.eventTime;if((c&q)===q){K!==null&&(K=K.next={eventTime:te,lane:0,tag:_.tag,payload:_.payload,callback:_.callback,next:null});e:{var ie=n,ce=_;switch(q=o,te=i,ce.tag){case 1:if(ie=ce.payload,typeof ie=="function"){Q=ie.call(te,Q,q);break e}Q=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=ce.payload,q=typeof ie=="function"?ie.call(te,Q,q):ie,q==null)break e;Q=z({},Q,q);break e;case 2:ir=!0}}_.callback!==null&&_.lane!==0&&(n.flags|=64,q=f.effects,q===null?f.effects=[_]:q.push(_))}else te={eventTime:te,lane:q,tag:_.tag,payload:_.payload,callback:_.callback,next:null},K===null?(F=K=te,T=Q):K=K.next=te,w|=q;if(_=_.next,_===null){if(_=f.shared.pending,_===null)break;q=_,_=q.next,q.next=null,f.lastBaseUpdate=q,f.shared.pending=null}}while(!0);if(K===null&&(T=Q),f.baseState=T,f.firstBaseUpdate=F,f.lastBaseUpdate=K,o=f.shared.interleaved,o!==null){f=o;do w|=f.lane,f=f.next;while(f!==o)}else p===null&&(f.shared.lanes=0);Wr|=w,n.lanes=w,n.memoizedState=Q}}function up(n,o,i){if(n=o.effects,o.effects=null,n!==null)for(o=0;oi?i:4,n(!0);var c=Jc.transition;Jc.transition={};try{n(!1),o()}finally{Fe=i,Jc.transition=c}}function Pp(){return Kt().memoizedState}function h1(n,o,i){var c=dr(n);if(i={lane:c,action:i,hasEagerState:!1,eagerState:null,next:null},Tp(n))Ap(o,i);else if(i=ap(n,o,i,c),i!==null){var f=kt();ln(i,n,c,f),Op(i,o,c)}}function p1(n,o,i){var c=dr(n),f={lane:c,action:i,hasEagerState:!1,eagerState:null,next:null};if(Tp(n))Ap(o,f);else{var p=n.alternate;if(n.lanes===0&&(p===null||p.lanes===0)&&(p=o.lastRenderedReducer,p!==null))try{var w=o.lastRenderedState,_=p(w,i);if(f.hasEagerState=!0,f.eagerState=_,nn(_,w)){var T=o.interleaved;T===null?(f.next=f,qc(o)):(f.next=T.next,T.next=f),o.interleaved=f;return}}catch{}finally{}i=ap(n,o,f,c),i!==null&&(f=kt(),ln(i,n,c,f),Op(i,o,c))}}function Tp(n){var o=n.alternate;return n===qe||o!==null&&o===qe}function Ap(n,o){Ks=ba=!0;var i=n.pending;i===null?o.next=o:(o.next=i.next,i.next=o),n.pending=o}function Op(n,o,i){if((i&4194240)!==0){var c=o.lanes;c&=n.pendingLanes,i|=c,o.lanes=i,ac(n,i)}}var Ca={readContext:qt,useCallback:vt,useContext:vt,useEffect:vt,useImperativeHandle:vt,useInsertionEffect:vt,useLayoutEffect:vt,useMemo:vt,useReducer:vt,useRef:vt,useState:vt,useDebugValue:vt,useDeferredValue:vt,useTransition:vt,useMutableSource:vt,useSyncExternalStore:vt,useId:vt,unstable_isNewReconciler:!1},m1={readContext:qt,useCallback:function(n,o){return wn().memoizedState=[n,o===void 0?null:o],n},useContext:qt,useEffect:bp,useImperativeHandle:function(n,o,i){return i=i!=null?i.concat([n]):null,Sa(4194308,4,Cp.bind(null,o,n),i)},useLayoutEffect:function(n,o){return Sa(4194308,4,n,o)},useInsertionEffect:function(n,o){return Sa(4,2,n,o)},useMemo:function(n,o){var i=wn();return o=o===void 0?null:o,n=n(),i.memoizedState=[n,o],n},useReducer:function(n,o,i){var c=wn();return o=i!==void 0?i(o):o,c.memoizedState=c.baseState=o,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:o},c.queue=n,n=n.dispatch=h1.bind(null,qe,n),[c.memoizedState,n]},useRef:function(n){var o=wn();return n={current:n},o.memoizedState=n},useState:wp,useDebugValue:su,useDeferredValue:function(n){return wn().memoizedState=n},useTransition:function(){var n=wp(!1),o=n[0];return n=f1.bind(null,n[1]),wn().memoizedState=n,[o,n]},useMutableSource:function(){},useSyncExternalStore:function(n,o,i){var c=qe,f=wn();if(Ve){if(i===void 0)throw Error(r(407));i=i()}else{if(i=o(),ct===null)throw Error(r(349));(Hr&30)!==0||pp(c,o,i)}f.memoizedState=i;var p={value:i,getSnapshot:o};return f.queue=p,bp(gp.bind(null,c,p,n),[n]),c.flags|=2048,Xs(9,mp.bind(null,c,p,i,o),void 0,null),i},useId:function(){var n=wn(),o=ct.identifierPrefix;if(Ve){var i=In,c=Ln;i=(c&~(1<<32-tn(c)-1)).toString(32)+i,o=":"+o+"R"+i,i=Qs++,0<\/script>",n=n.removeChild(n.firstChild)):typeof c.is=="string"?n=w.createElement(i,{is:c.is}):(n=w.createElement(i),i==="select"&&(w=n,c.multiple?w.multiple=!0:c.size&&(w.size=c.size))):n=w.createElementNS(n,i),n[yn]=o,n[zs]=c,Jp(n,o,!1,!1),o.stateNode=n;e:{switch(w=Gl(i,c),i){case"dialog":ze("cancel",n),ze("close",n),f=c;break;case"iframe":case"object":case"embed":ze("load",n),f=c;break;case"video":case"audio":for(f=0;fVo&&(o.flags|=128,c=!0,Gs(p,!1),o.lanes=4194304)}else{if(!c)if(n=wa(w),n!==null){if(o.flags|=128,c=!0,i=n.updateQueue,i!==null&&(o.updateQueue=i,o.flags|=4),Gs(p,!0),p.tail===null&&p.tailMode==="hidden"&&!w.alternate&&!Ve)return wt(o),null}else 2*Ge()-p.renderingStartTime>Vo&&i!==1073741824&&(o.flags|=128,c=!0,Gs(p,!1),o.lanes=4194304);p.isBackwards?(w.sibling=o.child,o.child=w):(i=p.last,i!==null?i.sibling=w:o.child=w,p.last=w)}return p.tail!==null?(o=p.tail,p.rendering=o,p.tail=o.sibling,p.renderingStartTime=Ge(),o.sibling=null,i=We.current,Be(We,c?i&1|2:i&1),o):(wt(o),null);case 22:case 23:return Pu(),c=o.memoizedState!==null,n!==null&&n.memoizedState!==null!==c&&(o.flags|=8192),c&&(o.mode&1)!==0?(Bt&1073741824)!==0&&(wt(o),o.subtreeFlags&6&&(o.flags|=8192)):wt(o),null;case 24:return null;case 25:return null}throw Error(r(156,o.tag))}function E1(n,o){switch(Fc(o),o.tag){case 1:return Nt(o.type)&&la(),n=o.flags,n&65536?(o.flags=n&-65537|128,o):null;case 3:return Uo(),$e(Rt),$e(yt),Gc(),n=o.flags,(n&65536)!==0&&(n&128)===0?(o.flags=n&-65537|128,o):null;case 5:return Yc(o),null;case 13:if($e(We),n=o.memoizedState,n!==null&&n.dehydrated!==null){if(o.alternate===null)throw Error(r(340));Io()}return n=o.flags,n&65536?(o.flags=n&-65537|128,o):null;case 19:return $e(We),null;case 4:return Uo(),null;case 10:return Hc(o.type._context),null;case 22:case 23:return Pu(),null;case 24:return null;default:return null}}var Na=!1,xt=!1,C1=typeof WeakSet=="function"?WeakSet:Set,oe=null;function zo(n,o){var i=n.ref;if(i!==null)if(typeof i=="function")try{i(null)}catch(c){Qe(n,o,c)}else i.current=null}function yu(n,o,i){try{i()}catch(c){Qe(n,o,c)}}var tm=!1;function k1(n,o){if(Pc=Qi,n=jh(),bc(n)){if("selectionStart"in n)var i={start:n.selectionStart,end:n.selectionEnd};else e:{i=(i=n.ownerDocument)&&i.defaultView||window;var c=i.getSelection&&i.getSelection();if(c&&c.rangeCount!==0){i=c.anchorNode;var f=c.anchorOffset,p=c.focusNode;c=c.focusOffset;try{i.nodeType,p.nodeType}catch{i=null;break e}var w=0,_=-1,T=-1,F=0,K=0,Q=n,q=null;t:for(;;){for(var te;Q!==i||f!==0&&Q.nodeType!==3||(_=w+f),Q!==p||c!==0&&Q.nodeType!==3||(T=w+c),Q.nodeType===3&&(w+=Q.nodeValue.length),(te=Q.firstChild)!==null;)q=Q,Q=te;for(;;){if(Q===n)break t;if(q===i&&++F===f&&(_=w),q===p&&++K===c&&(T=w),(te=Q.nextSibling)!==null)break;Q=q,q=Q.parentNode}Q=te}i=_===-1||T===-1?null:{start:_,end:T}}else i=null}i=i||{start:0,end:0}}else i=null;for(Tc={focusedElem:n,selectionRange:i},Qi=!1,oe=o;oe!==null;)if(o=oe,n=o.child,(o.subtreeFlags&1028)!==0&&n!==null)n.return=o,oe=n;else for(;oe!==null;){o=oe;try{var ie=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(ie!==null){var ce=ie.memoizedProps,Je=ie.memoizedState,I=o.stateNode,j=I.getSnapshotBeforeUpdate(o.elementType===o.type?ce:on(o.type,ce),Je);I.__reactInternalSnapshotBeforeUpdate=j}break;case 3:var M=o.stateNode.containerInfo;M.nodeType===1?M.textContent="":M.nodeType===9&&M.documentElement&&M.removeChild(M.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(Y){Qe(o,o.return,Y)}if(n=o.sibling,n!==null){n.return=o.return,oe=n;break}oe=o.return}return ie=tm,tm=!1,ie}function Js(n,o,i){var c=o.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var f=c=c.next;do{if((f.tag&n)===n){var p=f.destroy;f.destroy=void 0,p!==void 0&&yu(o,i,p)}f=f.next}while(f!==c)}}function Pa(n,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var i=o=o.next;do{if((i.tag&n)===n){var c=i.create;i.destroy=c()}i=i.next}while(i!==o)}}function vu(n){var o=n.ref;if(o!==null){var i=n.stateNode;switch(n.tag){case 5:n=i;break;default:n=i}typeof o=="function"?o(n):o.current=n}}function nm(n){var o=n.alternate;o!==null&&(n.alternate=null,nm(o)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(o=n.stateNode,o!==null&&(delete o[yn],delete o[zs],delete o[Lc],delete o[a1],delete o[l1])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function rm(n){return n.tag===5||n.tag===3||n.tag===4}function om(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||rm(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function wu(n,o,i){var c=n.tag;if(c===5||c===6)n=n.stateNode,o?i.nodeType===8?i.parentNode.insertBefore(n,o):i.insertBefore(n,o):(i.nodeType===8?(o=i.parentNode,o.insertBefore(n,i)):(o=i,o.appendChild(n)),i=i._reactRootContainer,i!=null||o.onclick!==null||(o.onclick=ia));else if(c!==4&&(n=n.child,n!==null))for(wu(n,o,i),n=n.sibling;n!==null;)wu(n,o,i),n=n.sibling}function xu(n,o,i){var c=n.tag;if(c===5||c===6)n=n.stateNode,o?i.insertBefore(n,o):i.appendChild(n);else if(c!==4&&(n=n.child,n!==null))for(xu(n,o,i),n=n.sibling;n!==null;)xu(n,o,i),n=n.sibling}var ht=null,sn=!1;function lr(n,o,i){for(i=i.child;i!==null;)sm(n,o,i),i=i.sibling}function sm(n,o,i){if(gn&&typeof gn.onCommitFiberUnmount=="function")try{gn.onCommitFiberUnmount($i,i)}catch{}switch(i.tag){case 5:xt||zo(i,o);case 6:var c=ht,f=sn;ht=null,lr(n,o,i),ht=c,sn=f,ht!==null&&(sn?(n=ht,i=i.stateNode,n.nodeType===8?n.parentNode.removeChild(i):n.removeChild(i)):ht.removeChild(i.stateNode));break;case 18:ht!==null&&(sn?(n=ht,i=i.stateNode,n.nodeType===8?jc(n.parentNode,i):n.nodeType===1&&jc(n,i),Ts(n)):jc(ht,i.stateNode));break;case 4:c=ht,f=sn,ht=i.stateNode.containerInfo,sn=!0,lr(n,o,i),ht=c,sn=f;break;case 0:case 11:case 14:case 15:if(!xt&&(c=i.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){f=c=c.next;do{var p=f,w=p.destroy;p=p.tag,w!==void 0&&((p&2)!==0||(p&4)!==0)&&yu(i,o,w),f=f.next}while(f!==c)}lr(n,o,i);break;case 1:if(!xt&&(zo(i,o),c=i.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=i.memoizedProps,c.state=i.memoizedState,c.componentWillUnmount()}catch(_){Qe(i,o,_)}lr(n,o,i);break;case 21:lr(n,o,i);break;case 22:i.mode&1?(xt=(c=xt)||i.memoizedState!==null,lr(n,o,i),xt=c):lr(n,o,i);break;default:lr(n,o,i)}}function im(n){var o=n.updateQueue;if(o!==null){n.updateQueue=null;var i=n.stateNode;i===null&&(i=n.stateNode=new C1),o.forEach(function(c){var f=L1.bind(null,n,c);i.has(c)||(i.add(c),c.then(f,f))})}}function an(n,o){var i=o.deletions;if(i!==null)for(var c=0;cf&&(f=w),c&=~p}if(c=f,c=Ge()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*R1(c/1960))-c,10n?16:n,ur===null)var c=!1;else{if(n=ur,ur=null,La=0,(Ie&6)!==0)throw Error(r(331));var f=Ie;for(Ie|=4,oe=n.current;oe!==null;){var p=oe,w=p.child;if((oe.flags&16)!==0){var _=p.deletions;if(_!==null){for(var T=0;T<_.length;T++){var F=_[T];for(oe=F;oe!==null;){var K=oe;switch(K.tag){case 0:case 11:case 15:Js(8,K,p)}var Q=K.child;if(Q!==null)Q.return=K,oe=Q;else for(;oe!==null;){K=oe;var q=K.sibling,te=K.return;if(nm(K),K===F){oe=null;break}if(q!==null){q.return=te,oe=q;break}oe=te}}}var ie=p.alternate;if(ie!==null){var ce=ie.child;if(ce!==null){ie.child=null;do{var Je=ce.sibling;ce.sibling=null,ce=Je}while(ce!==null)}}oe=p}}if((p.subtreeFlags&2064)!==0&&w!==null)w.return=p,oe=w;else e:for(;oe!==null;){if(p=oe,(p.flags&2048)!==0)switch(p.tag){case 0:case 11:case 15:Js(9,p,p.return)}var I=p.sibling;if(I!==null){I.return=p.return,oe=I;break e}oe=p.return}}var j=n.current;for(oe=j;oe!==null;){w=oe;var M=w.child;if((w.subtreeFlags&2064)!==0&&M!==null)M.return=w,oe=M;else e:for(w=j;oe!==null;){if(_=oe,(_.flags&2048)!==0)try{switch(_.tag){case 0:case 11:case 15:Pa(9,_)}}catch(fe){Qe(_,_.return,fe)}if(_===w){oe=null;break e}var Y=_.sibling;if(Y!==null){Y.return=_.return,oe=Y;break e}oe=_.return}}if(Ie=f,sr(),gn&&typeof gn.onPostCommitFiberRoot=="function")try{gn.onPostCommitFiberRoot($i,n)}catch{}c=!0}return c}finally{Fe=i,Qt.transition=o}}return!1}function vm(n,o,i){o=Bo(i,o),o=Mp(n,o,1),n=ar(n,o,1),o=kt(),n!==null&&(ks(n,1,o),At(n,o))}function Qe(n,o,i){if(n.tag===3)vm(n,n,i);else for(;o!==null;){if(o.tag===3){vm(o,n,i);break}else if(o.tag===1){var c=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(cr===null||!cr.has(c))){n=Bo(i,n),n=Dp(o,n,1),o=ar(o,n,1),n=kt(),o!==null&&(ks(o,1,n),At(o,n));break}}o=o.return}}function O1(n,o,i){var c=n.pingCache;c!==null&&c.delete(o),o=kt(),n.pingedLanes|=n.suspendedLanes&i,ct===n&&(pt&i)===i&&(it===4||it===3&&(pt&130023424)===pt&&500>Ge()-Eu?Kr(n,0):Su|=i),At(n,o)}function wm(n,o){o===0&&((n.mode&1)===0?o=1:(o=Hi,Hi<<=1,(Hi&130023424)===0&&(Hi=4194304)));var i=kt();n=Mn(n,o),n!==null&&(ks(n,o,i),At(n,i))}function j1(n){var o=n.memoizedState,i=0;o!==null&&(i=o.retryLane),wm(n,i)}function L1(n,o){var i=0;switch(n.tag){case 13:var c=n.stateNode,f=n.memoizedState;f!==null&&(i=f.retryLane);break;case 19:c=n.stateNode;break;default:throw Error(r(314))}c!==null&&c.delete(o),wm(n,i)}var xm;xm=function(n,o,i){if(n!==null)if(n.memoizedProps!==o.pendingProps||Rt.current)Pt=!0;else{if((n.lanes&i)===0&&(o.flags&128)===0)return Pt=!1,b1(n,o,i);Pt=(n.flags&131072)!==0}else Pt=!1,Ve&&(o.flags&1048576)!==0&&Zh(o,fa,o.index);switch(o.lanes=0,o.tag){case 2:var c=o.type;Ra(n,o),n=o.pendingProps;var f=Oo(o,yt.current);Fo(o,i),f=eu(null,o,c,n,f,i);var p=tu();return o.flags|=1,typeof f=="object"&&f!==null&&typeof f.render=="function"&&f.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,Nt(c)?(p=!0,ca(o)):p=!1,o.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,Kc(o),f.updater=ka,o.stateNode=f,f._reactInternals=o,au(o,c,n,i),o=du(null,o,c,!0,p,i)):(o.tag=0,Ve&&p&&Dc(o),Ct(null,o,f,i),o=o.child),o;case 16:c=o.elementType;e:{switch(Ra(n,o),n=o.pendingProps,f=c._init,c=f(c._payload),o.type=c,f=o.tag=M1(c),n=on(c,n),f){case 0:o=uu(null,o,c,n,i);break e;case 1:o=qp(null,o,c,n,i);break e;case 11:o=zp(null,o,c,n,i);break e;case 14:o=$p(null,o,c,on(c.type,n),i);break e}throw Error(r(306,c,""))}return o;case 0:return c=o.type,f=o.pendingProps,f=o.elementType===c?f:on(c,f),uu(n,o,c,f,i);case 1:return c=o.type,f=o.pendingProps,f=o.elementType===c?f:on(c,f),qp(n,o,c,f,i);case 3:e:{if(Kp(o),n===null)throw Error(r(387));c=o.pendingProps,p=o.memoizedState,f=p.element,lp(n,o),va(o,c,null,i);var w=o.memoizedState;if(c=w.element,p.isDehydrated)if(p={element:c,isDehydrated:!1,cache:w.cache,pendingSuspenseBoundaries:w.pendingSuspenseBoundaries,transitions:w.transitions},o.updateQueue.baseState=p,o.memoizedState=p,o.flags&256){f=Bo(Error(r(423)),o),o=Qp(n,o,c,i,f);break e}else if(c!==f){f=Bo(Error(r(424)),o),o=Qp(n,o,c,i,f);break e}else for(Ut=nr(o.stateNode.containerInfo.firstChild),Ft=o,Ve=!0,rn=null,i=ip(o,null,c,i),o.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(Io(),c===f){o=Fn(n,o,i);break e}Ct(n,o,c,i)}o=o.child}return o;case 5:return dp(o),n===null&&Bc(o),c=o.type,f=o.pendingProps,p=n!==null?n.memoizedProps:null,w=f.children,Ac(c,f)?w=null:p!==null&&Ac(c,p)&&(o.flags|=32),Wp(n,o),Ct(n,o,w,i),o.child;case 6:return n===null&&Bc(o),null;case 13:return Yp(n,o,i);case 4:return Qc(o,o.stateNode.containerInfo),c=o.pendingProps,n===null?o.child=Mo(o,null,c,i):Ct(n,o,c,i),o.child;case 11:return c=o.type,f=o.pendingProps,f=o.elementType===c?f:on(c,f),zp(n,o,c,f,i);case 7:return Ct(n,o,o.pendingProps,i),o.child;case 8:return Ct(n,o,o.pendingProps.children,i),o.child;case 12:return Ct(n,o,o.pendingProps.children,i),o.child;case 10:e:{if(c=o.type._context,f=o.pendingProps,p=o.memoizedProps,w=f.value,Be(ma,c._currentValue),c._currentValue=w,p!==null)if(nn(p.value,w)){if(p.children===f.children&&!Rt.current){o=Fn(n,o,i);break e}}else for(p=o.child,p!==null&&(p.return=o);p!==null;){var _=p.dependencies;if(_!==null){w=p.child;for(var T=_.firstContext;T!==null;){if(T.context===c){if(p.tag===1){T=Dn(-1,i&-i),T.tag=2;var F=p.updateQueue;if(F!==null){F=F.shared;var K=F.pending;K===null?T.next=T:(T.next=K.next,K.next=T),F.pending=T}}p.lanes|=i,T=p.alternate,T!==null&&(T.lanes|=i),Wc(p.return,i,o),_.lanes|=i;break}T=T.next}}else if(p.tag===10)w=p.type===o.type?null:p.child;else if(p.tag===18){if(w=p.return,w===null)throw Error(r(341));w.lanes|=i,_=w.alternate,_!==null&&(_.lanes|=i),Wc(w,i,o),w=p.sibling}else w=p.child;if(w!==null)w.return=p;else for(w=p;w!==null;){if(w===o){w=null;break}if(p=w.sibling,p!==null){p.return=w.return,w=p;break}w=w.return}p=w}Ct(n,o,f.children,i),o=o.child}return o;case 9:return f=o.type,c=o.pendingProps.children,Fo(o,i),f=qt(f),c=c(f),o.flags|=1,Ct(n,o,c,i),o.child;case 14:return c=o.type,f=on(c,o.pendingProps),f=on(c.type,f),$p(n,o,c,f,i);case 15:return Vp(n,o,o.type,o.pendingProps,i);case 17:return c=o.type,f=o.pendingProps,f=o.elementType===c?f:on(c,f),Ra(n,o),o.tag=1,Nt(c)?(n=!0,ca(o)):n=!1,Fo(o,i),Lp(o,c,f),au(o,c,f,i),du(null,o,c,!0,n,i);case 19:return Gp(n,o,i);case 22:return Hp(n,o,i)}throw Error(r(156,o.tag))};function bm(n,o){return eh(n,o)}function I1(n,o,i,c){this.tag=n,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yt(n,o,i,c){return new I1(n,o,i,c)}function Au(n){return n=n.prototype,!(!n||!n.isReactComponent)}function M1(n){if(typeof n=="function")return Au(n)?1:0;if(n!=null){if(n=n.$$typeof,n===he)return 11;if(n===Ee)return 14}return 2}function hr(n,o){var i=n.alternate;return i===null?(i=Yt(n.tag,o,n.key,n.mode),i.elementType=n.elementType,i.type=n.type,i.stateNode=n.stateNode,i.alternate=n,n.alternate=i):(i.pendingProps=o,i.type=n.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=n.flags&14680064,i.childLanes=n.childLanes,i.lanes=n.lanes,i.child=n.child,i.memoizedProps=n.memoizedProps,i.memoizedState=n.memoizedState,i.updateQueue=n.updateQueue,o=n.dependencies,i.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},i.sibling=n.sibling,i.index=n.index,i.ref=n.ref,i}function Fa(n,o,i,c,f,p){var w=2;if(c=n,typeof n=="function")Au(n)&&(w=1);else if(typeof n=="string")w=5;else e:switch(n){case H:return Yr(i.children,f,p,o);case U:w=8,f|=8;break;case X:return n=Yt(12,i,o,f|2),n.elementType=X,n.lanes=p,n;case ve:return n=Yt(13,i,o,f),n.elementType=ve,n.lanes=p,n;case ue:return n=Yt(19,i,o,f),n.elementType=ue,n.lanes=p,n;case se:return Ua(i,f,p,o);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case re:w=10;break e;case ee:w=9;break e;case he:w=11;break e;case Ee:w=14;break e;case J:w=16,c=null;break e}throw Error(r(130,n==null?n:typeof n,""))}return o=Yt(w,i,o,f),o.elementType=n,o.type=c,o.lanes=p,o}function Yr(n,o,i,c){return n=Yt(7,n,c,o),n.lanes=i,n}function Ua(n,o,i,c){return n=Yt(22,n,c,o),n.elementType=se,n.lanes=i,n.stateNode={isHidden:!1},n}function Ou(n,o,i){return n=Yt(6,n,null,o),n.lanes=i,n}function ju(n,o,i){return o=Yt(4,n.children!==null?n.children:[],n.key,o),o.lanes=i,o.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},o}function D1(n,o,i,c,f){this.tag=o,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ic(0),this.expirationTimes=ic(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ic(0),this.identifierPrefix=c,this.onRecoverableError=f,this.mutableSourceEagerHydrationData=null}function Lu(n,o,i,c,f,p,w,_,T){return n=new D1(n,o,i,_,T),o===1?(o=1,p===!0&&(o|=8)):o=0,p=Yt(3,null,null,o),n.current=p,p.stateNode=n,p.memoizedState={element:c,isDehydrated:i,cache:null,transitions:null,pendingSuspenseBoundaries:null},Kc(p),n}function F1(n,o,i){var c=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),zu.exports=X1(),zu.exports}var Mm;function G1(){if(Mm)return Ka;Mm=1;var e=Py();return Ka.createRoot=e.createRoot,Ka.hydrateRoot=e.hydrateRoot,Ka}var J1=G1();const Z1=ef(J1),eb=20,tb=1e6,Hn={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let Hu=0;function nb(){return Hu=(Hu+1)%Number.MAX_VALUE,Hu.toString()}const Wu=new Map,Dm=e=>{if(Wu.has(e))return;const t=setTimeout(()=>{Wu.delete(e),hi({type:Hn.REMOVE_TOAST,toastId:e})},tb);Wu.set(e,t)},rb=(e,t)=>{switch(t.type){case Hn.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,eb)};case Hn.UPDATE_TOAST:return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case Hn.DISMISS_TOAST:{const{toastId:r}=t;return r?Dm(r):e.toasts.forEach(s=>{Dm(s.id)}),{...e,toasts:e.toasts.map(s=>s.id===r||r===void 0?{...s,open:!1}:s)}}case Hn.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},il=[];let al={toasts:[]};function hi(e){al=rb(al,e),il.forEach(t=>{t(al)})}function ob({...e}){const t=nb(),r=a=>hi({type:Hn.UPDATE_TOAST,toast:{...a,id:t}}),s=()=>hi({type:Hn.DISMISS_TOAST,toastId:t});return hi({type:Hn.ADD_TOAST,toast:{...e,id:t,open:!0,onOpenChange:a=>{a||s()}}}),{id:t,dismiss:s,update:r}}function sb(){const[e,t]=x.useState(al);return x.useEffect(()=>(il.push(t),()=>{const r=il.indexOf(t);r>-1&&il.splice(r,1)}),[e]),{...e,toast:ob,dismiss:r=>hi({type:Hn.DISMISS_TOAST,toastId:r})}}function Ty(e){var t,r,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;ttypeof e=="boolean"?`${e}`:e===0?"0":e,Um=Ay,Oy=(e,t)=>r=>{var s;if((t==null?void 0:t.variants)==null)return Um(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:l}=t,u=Object.keys(a).map(m=>{const g=r==null?void 0:r[m],y=l==null?void 0:l[m];if(g===null)return null;const C=Fm(g)||Fm(y);return a[m][C]}),d=r&&Object.entries(r).reduce((m,g)=>{let[y,C]=g;return C===void 0||(m[y]=C),m},{}),h=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((m,g)=>{let{class:y,className:C,...k}=g;return Object.entries(k).every(E=>{let[v,S]=E;return Array.isArray(S)?S.includes({...l,...d}[v]):{...l,...d}[v]===S})?[...m,y,C]:m},[]);return Um(e,u,h,r==null?void 0:r.class,r==null?void 0:r.className)};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ib=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),jy=(...e)=>e.filter((t,r,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===r).join(" ").trim();/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var ab={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const lb=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:s,className:a="",children:l,iconNode:u,...d},h)=>x.createElement("svg",{ref:h,...ab,width:t,height:t,stroke:e,strokeWidth:s?Number(r)*24/Number(t):r,className:jy("lucide",a),...d},[...u.map(([m,g])=>x.createElement(m,g)),...Array.isArray(l)?l:[l]]));/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Le=(e,t)=>{const r=x.forwardRef(({className:s,...a},l)=>x.createElement(lb,{ref:l,iconNode:t,className:jy(`lucide-${ib(e)}`,s),...a}));return r.displayName=`${e}`,r};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const cb=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Ly=Le("ArrowRight",cb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ub=[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2",key:"9lu3g6"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M6 12h.01M18 12h.01",key:"113zkx"}]],db=Le("Banknote",ub);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const fb=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],nf=Le("BookOpen",fb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const hb=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],pb=Le("Briefcase",hb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const mb=[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]],gb=Le("Building",mb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const yb=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Iy=Le("Check",yb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const vb=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],My=Le("ChevronDown",vb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const wb=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],xb=Le("ChevronUp",wb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const bb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Sb=Le("CircleCheck",bb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Eb=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],Cb=Le("Download",Eb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const kb=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],_b=Le("Eye",kb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Rb=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Nb=Le("FileText",Rb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Pb=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Tb=Le("FileWarning",Pb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ab=[["path",{d:"m11 17 2 2a1 1 0 1 0 3-3",key:"efffak"}],["path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4",key:"9pr0kb"}],["path",{d:"m21 3 1 11h-2",key:"1tisrp"}],["path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3",key:"1uvwmv"}],["path",{d:"M3 4h8",key:"1ep09j"}]],Ob=Le("Handshake",Ab);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const jb=[["path",{d:"M10 10V5a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v5",key:"1p9q5i"}],["path",{d:"M14 6a6 6 0 0 1 6 6v3",key:"1hnv84"}],["path",{d:"M4 15v-3a6 6 0 0 1 6-6",key:"9ciidu"}],["rect",{x:"2",y:"15",width:"20",height:"4",rx:"1",key:"g3x8cw"}]],Lb=Le("HardHat",jb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ib=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}],["path",{d:"M12 5 9.04 7.96a2.17 2.17 0 0 0 0 3.08c.82.82 2.13.85 3 .07l2.07-1.9a2.82 2.82 0 0 1 3.79 0l2.96 2.66",key:"4oyue0"}],["path",{d:"m18 15-2-2",key:"60u0ii"}],["path",{d:"m15 18-2-2",key:"6p76be"}]],Mb=Le("HeartHandshake",Ib);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Db=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]],Fb=Le("Heart",Db);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ub=[["line",{x1:"3",x2:"21",y1:"22",y2:"22",key:"j8o0r"}],["line",{x1:"6",x2:"6",y1:"18",y2:"11",key:"10tf0k"}],["line",{x1:"10",x2:"10",y1:"18",y2:"11",key:"54lgf6"}],["line",{x1:"14",x2:"14",y1:"18",y2:"11",key:"380y"}],["line",{x1:"18",x2:"18",y1:"18",y2:"11",key:"1kevvc"}],["polygon",{points:"12 2 20 7 4 7",key:"jkujk7"}]],Bb=Le("Landmark",Ub);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const zb=[["path",{d:"M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z",key:"nnexq3"}],["path",{d:"M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12",key:"mt58a7"}]],$b=Le("Leaf",zb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Vb=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Hb=Le("LoaderCircle",Vb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Wb=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Dy=Le("Lock",Wb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const qb=[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]],Kb=Le("Mail",qb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Qb=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],Yb=Le("MapPin",Qb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Xb=[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}]],Gb=Le("Mountain",Xb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Jb=[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]],Zb=Le("Phone",Jb);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const eS=[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]],tS=Le("Scale",eS);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const nS=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],rS=Le("ShieldAlert",nS);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const oS=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],sS=Le("ShieldCheck",oS);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const iS=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],rf=Le("Shield",iS);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const aS=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],lS=Le("TriangleAlert",aS);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const cS=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],uS=Le("Upload",cS);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const dS=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]],fS=Le("UserCheck",dS);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const hS=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]],of=Le("Users",hS);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const pS=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],mS=Le("X",pS),gS=(e,t)=>{const r=new Array(e.length+t.length);for(let s=0;s({classGroupId:e,validator:t}),Fy=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),wl="-",Bm=[],vS="arbitrary..",wS=e=>{const t=bS(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return xS(u);const d=u.split(wl),h=d[0]===""&&d.length>1?1:0;return Uy(d,h,t)},getConflictingClassGroupIds:(u,d)=>{if(d){const h=s[u],m=r[u];return h?m?gS(m,h):h:m||Bm}return r[u]||Bm}}},Uy=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const a=e[t],l=r.nextPart.get(a);if(l){const m=Uy(e,t+1,l);if(m)return m}const u=r.validators;if(u===null)return;const d=t===0?e.join(wl):e.slice(t).join(wl),h=u.length;for(let m=0;me.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),s=t.slice(0,r);return s?vS+s:void 0})(),bS=e=>{const{theme:t,classGroups:r}=e;return SS(r,t)},SS=(e,t)=>{const r=Fy();for(const s in e){const a=e[s];sf(a,r,s,t)}return r},sf=(e,t,r,s)=>{const a=e.length;for(let l=0;l{if(typeof e=="string"){CS(e,t,r);return}if(typeof e=="function"){kS(e,t,r,s);return}_S(e,t,r,s)},CS=(e,t,r)=>{const s=e===""?t:By(t,e);s.classGroupId=r},kS=(e,t,r,s)=>{if(RS(e)){sf(e(s),t,r,s);return}t.validators===null&&(t.validators=[]),t.validators.push(yS(r,e))},_S=(e,t,r,s)=>{const a=Object.entries(e),l=a.length;for(let u=0;u{let r=e;const s=t.split(wl),a=s.length;for(let l=0;l"isThemeGetter"in e&&e.isThemeGetter===!0,NS=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),s=Object.create(null);const a=(l,u)=>{r[l]=u,t++,t>e&&(t=0,s=r,r=Object.create(null))};return{get(l){let u=r[l];if(u!==void 0)return u;if((u=s[l])!==void 0)return a(l,u),u},set(l,u){l in r?r[l]=u:a(l,u)}}},fd="!",zm=":",PS=[],$m=(e,t,r,s,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:s,isExternal:a}),TS=e=>{const{prefix:t,experimentalParseClassName:r}=e;let s=a=>{const l=[];let u=0,d=0,h=0,m;const g=a.length;for(let v=0;vh?m-h:void 0;return $m(l,k,C,E)};if(t){const a=t+zm,l=s;s=u=>u.startsWith(a)?l(u.slice(a.length)):$m(PS,!1,u,void 0,!0)}if(r){const a=s;s=l=>r({className:l,parseClassName:a})}return s},AS=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,s)=>{t.set(r,1e6+s)}),r=>{const s=[];let a=[];for(let l=0;l0&&(a.sort(),s.push(...a),a=[]),s.push(u)):a.push(u)}return a.length>0&&(a.sort(),s.push(...a)),s}},OS=e=>({cache:NS(e.cacheSize),parseClassName:TS(e),sortModifiers:AS(e),...wS(e)}),jS=/\s+/,LS=(e,t)=>{const{parseClassName:r,getClassGroupId:s,getConflictingClassGroupIds:a,sortModifiers:l}=t,u=[],d=e.trim().split(jS);let h="";for(let m=d.length-1;m>=0;m-=1){const g=d[m],{isExternal:y,modifiers:C,hasImportantModifier:k,baseClassName:E,maybePostfixModifierPosition:v}=r(g);if(y){h=g+(h.length>0?" "+h:h);continue}let S=!!v,R=s(S?E.substring(0,v):E);if(!R){if(!S){h=g+(h.length>0?" "+h:h);continue}if(R=s(E),!R){h=g+(h.length>0?" "+h:h);continue}S=!1}const P=C.length===0?"":C.length===1?C[0]:l(C).join(":"),N=k?P+fd:P,A=N+R;if(u.indexOf(A)>-1)continue;u.push(A);const D=a(R,S);for(let V=0;V0?" "+h:h)}return h},IS=(...e)=>{let t=0,r,s,a="";for(;t{if(typeof e=="string")return e;let t,r="";for(let s=0;s{let r,s,a,l;const u=h=>{const m=t.reduce((g,y)=>y(g),e());return r=OS(m),s=r.cache.get,a=r.cache.set,l=d,d(h)},d=h=>{const m=s(h);if(m)return m;const g=LS(h,r);return a(h,g),g};return l=u,(...h)=>l(IS(...h))},DS=[],at=e=>{const t=r=>r[e]||DS;return t.isThemeGetter=!0,t},$y=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Vy=/^\((?:(\w[\w-]*):)?(.+)\)$/i,FS=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,US=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,BS=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,zS=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,$S=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,VS=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,mr=e=>FS.test(e),Re=e=>!!e&&!Number.isNaN(Number(e)),gr=e=>!!e&&Number.isInteger(Number(e)),qu=e=>e.endsWith("%")&&Re(e.slice(0,-1)),Bn=e=>US.test(e),Hy=()=>!0,HS=e=>BS.test(e)&&!zS.test(e),af=()=>!1,WS=e=>$S.test(e),qS=e=>VS.test(e),KS=e=>!ae(e)&&!le(e),QS=e=>Lr(e,Ky,af),ae=e=>$y.test(e),Xr=e=>Lr(e,Qy,HS),Vm=e=>Lr(e,nE,Re),YS=e=>Lr(e,Xy,Hy),XS=e=>Lr(e,Yy,af),Hm=e=>Lr(e,Wy,af),GS=e=>Lr(e,qy,qS),Qa=e=>Lr(e,Gy,WS),le=e=>Vy.test(e),oi=e=>yo(e,Qy),JS=e=>yo(e,Yy),Wm=e=>yo(e,Wy),ZS=e=>yo(e,Ky),eE=e=>yo(e,qy),Ya=e=>yo(e,Gy,!0),tE=e=>yo(e,Xy,!0),Lr=(e,t,r)=>{const s=$y.exec(e);return s?s[1]?t(s[1]):r(s[2]):!1},yo=(e,t,r=!1)=>{const s=Vy.exec(e);return s?s[1]?t(s[1]):r:!1},Wy=e=>e==="position"||e==="percentage",qy=e=>e==="image"||e==="url",Ky=e=>e==="length"||e==="size"||e==="bg-size",Qy=e=>e==="length",nE=e=>e==="number",Yy=e=>e==="family-name",Xy=e=>e==="number"||e==="weight",Gy=e=>e==="shadow",rE=()=>{const e=at("color"),t=at("font"),r=at("text"),s=at("font-weight"),a=at("tracking"),l=at("leading"),u=at("breakpoint"),d=at("container"),h=at("spacing"),m=at("radius"),g=at("shadow"),y=at("inset-shadow"),C=at("text-shadow"),k=at("drop-shadow"),E=at("blur"),v=at("perspective"),S=at("aspect"),R=at("ease"),P=at("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],D=()=>[...A(),le,ae],V=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto","contain","none"],U=()=>[le,ae,h],X=()=>[mr,"full","auto",...U()],re=()=>[gr,"none","subgrid",le,ae],ee=()=>["auto",{span:["full",gr,le,ae]},gr,le,ae],he=()=>[gr,"auto",le,ae],ve=()=>["auto","min","max","fr",le,ae],ue=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Ee=()=>["start","end","center","stretch","center-safe","end-safe"],J=()=>["auto",...U()],se=()=>[mr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...U()],$=()=>[mr,"screen","full","dvw","lvw","svw","min","max","fit",...U()],G=()=>[mr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...U()],z=()=>[e,le,ae],L=()=>[...A(),Wm,Hm,{position:[le,ae]}],W=()=>["no-repeat",{repeat:["","x","y","space","round"]}],we=()=>["auto","cover","contain",ZS,QS,{size:[le,ae]}],ye=()=>[qu,oi,Xr],pe=()=>["","none","full",m,le,ae],ge=()=>["",Re,oi,Xr],Z=()=>["solid","dashed","dotted","double"],me=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],de=()=>[Re,qu,Wm,Hm],_e=()=>["","none",E,le,ae],Ne=()=>["none",Re,le,ae],Te=()=>["none",Re,le,ae],Ke=()=>[Re,le,ae],ot=()=>[mr,"full",...U()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Bn],breakpoint:[Bn],color:[Hy],container:[Bn],"drop-shadow":[Bn],ease:["in","out","in-out"],font:[KS],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Bn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Bn],shadow:[Bn],spacing:["px",Re],text:[Bn],"text-shadow":[Bn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",mr,ae,le,S]}],container:["container"],columns:[{columns:[Re,ae,le,d]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:D()}],overflow:[{overflow:V()}],"overflow-x":[{"overflow-x":V()}],"overflow-y":[{"overflow-y":V()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:X()}],"inset-x":[{"inset-x":X()}],"inset-y":[{"inset-y":X()}],start:[{"inset-s":X(),start:X()}],end:[{"inset-e":X(),end:X()}],"inset-bs":[{"inset-bs":X()}],"inset-be":[{"inset-be":X()}],top:[{top:X()}],right:[{right:X()}],bottom:[{bottom:X()}],left:[{left:X()}],visibility:["visible","invisible","collapse"],z:[{z:[gr,"auto",le,ae]}],basis:[{basis:[mr,"full","auto",d,...U()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Re,mr,"auto","initial","none",ae]}],grow:[{grow:["",Re,le,ae]}],shrink:[{shrink:["",Re,le,ae]}],order:[{order:[gr,"first","last","none",le,ae]}],"grid-cols":[{"grid-cols":re()}],"col-start-end":[{col:ee()}],"col-start":[{"col-start":he()}],"col-end":[{"col-end":he()}],"grid-rows":[{"grid-rows":re()}],"row-start-end":[{row:ee()}],"row-start":[{"row-start":he()}],"row-end":[{"row-end":he()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ve()}],"auto-rows":[{"auto-rows":ve()}],gap:[{gap:U()}],"gap-x":[{"gap-x":U()}],"gap-y":[{"gap-y":U()}],"justify-content":[{justify:[...ue(),"normal"]}],"justify-items":[{"justify-items":[...Ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...Ee()]}],"align-content":[{content:["normal",...ue()]}],"align-items":[{items:[...Ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":ue()}],"place-items":[{"place-items":[...Ee(),"baseline"]}],"place-self":[{"place-self":["auto",...Ee()]}],p:[{p:U()}],px:[{px:U()}],py:[{py:U()}],ps:[{ps:U()}],pe:[{pe:U()}],pbs:[{pbs:U()}],pbe:[{pbe:U()}],pt:[{pt:U()}],pr:[{pr:U()}],pb:[{pb:U()}],pl:[{pl:U()}],m:[{m:J()}],mx:[{mx:J()}],my:[{my:J()}],ms:[{ms:J()}],me:[{me:J()}],mbs:[{mbs:J()}],mbe:[{mbe:J()}],mt:[{mt:J()}],mr:[{mr:J()}],mb:[{mb:J()}],ml:[{ml:J()}],"space-x":[{"space-x":U()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":U()}],"space-y-reverse":["space-y-reverse"],size:[{size:se()}],"inline-size":[{inline:["auto",...$()]}],"min-inline-size":[{"min-inline":["auto",...$()]}],"max-inline-size":[{"max-inline":["none",...$()]}],"block-size":[{block:["auto",...G()]}],"min-block-size":[{"min-block":["auto",...G()]}],"max-block-size":[{"max-block":["none",...G()]}],w:[{w:[d,"screen",...se()]}],"min-w":[{"min-w":[d,"screen","none",...se()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[u]},...se()]}],h:[{h:["screen","lh",...se()]}],"min-h":[{"min-h":["screen","lh","none",...se()]}],"max-h":[{"max-h":["screen","lh",...se()]}],"font-size":[{text:["base",r,oi,Xr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,tE,YS]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",qu,ae]}],"font-family":[{font:[JS,XS,t]}],"font-features":[{"font-features":[ae]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,le,ae]}],"line-clamp":[{"line-clamp":[Re,"none",le,Vm]}],leading:[{leading:[l,...U()]}],"list-image":[{"list-image":["none",le,ae]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",le,ae]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:z()}],"text-color":[{text:z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Z(),"wavy"]}],"text-decoration-thickness":[{decoration:[Re,"from-font","auto",le,Xr]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[Re,"auto",le,ae]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",le,ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",le,ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:W()}],"bg-size":[{bg:we()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},gr,le,ae],radial:["",le,ae],conic:[gr,le,ae]},eE,GS]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:ye()}],"gradient-via-pos":[{via:ye()}],"gradient-to-pos":[{to:ye()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],rounded:[{rounded:pe()}],"rounded-s":[{"rounded-s":pe()}],"rounded-e":[{"rounded-e":pe()}],"rounded-t":[{"rounded-t":pe()}],"rounded-r":[{"rounded-r":pe()}],"rounded-b":[{"rounded-b":pe()}],"rounded-l":[{"rounded-l":pe()}],"rounded-ss":[{"rounded-ss":pe()}],"rounded-se":[{"rounded-se":pe()}],"rounded-ee":[{"rounded-ee":pe()}],"rounded-es":[{"rounded-es":pe()}],"rounded-tl":[{"rounded-tl":pe()}],"rounded-tr":[{"rounded-tr":pe()}],"rounded-br":[{"rounded-br":pe()}],"rounded-bl":[{"rounded-bl":pe()}],"border-w":[{border:ge()}],"border-w-x":[{"border-x":ge()}],"border-w-y":[{"border-y":ge()}],"border-w-s":[{"border-s":ge()}],"border-w-e":[{"border-e":ge()}],"border-w-bs":[{"border-bs":ge()}],"border-w-be":[{"border-be":ge()}],"border-w-t":[{"border-t":ge()}],"border-w-r":[{"border-r":ge()}],"border-w-b":[{"border-b":ge()}],"border-w-l":[{"border-l":ge()}],"divide-x":[{"divide-x":ge()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ge()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Z(),"hidden","none"]}],"divide-style":[{divide:[...Z(),"hidden","none"]}],"border-color":[{border:z()}],"border-color-x":[{"border-x":z()}],"border-color-y":[{"border-y":z()}],"border-color-s":[{"border-s":z()}],"border-color-e":[{"border-e":z()}],"border-color-bs":[{"border-bs":z()}],"border-color-be":[{"border-be":z()}],"border-color-t":[{"border-t":z()}],"border-color-r":[{"border-r":z()}],"border-color-b":[{"border-b":z()}],"border-color-l":[{"border-l":z()}],"divide-color":[{divide:z()}],"outline-style":[{outline:[...Z(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Re,le,ae]}],"outline-w":[{outline:["",Re,oi,Xr]}],"outline-color":[{outline:z()}],shadow:[{shadow:["","none",g,Ya,Qa]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",y,Ya,Qa]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:ge()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[Re,Xr]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":ge()}],"inset-ring-color":[{"inset-ring":z()}],"text-shadow":[{"text-shadow":["none",C,Ya,Qa]}],"text-shadow-color":[{"text-shadow":z()}],opacity:[{opacity:[Re,le,ae]}],"mix-blend":[{"mix-blend":[...me(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":me()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Re]}],"mask-image-linear-from-pos":[{"mask-linear-from":de()}],"mask-image-linear-to-pos":[{"mask-linear-to":de()}],"mask-image-linear-from-color":[{"mask-linear-from":z()}],"mask-image-linear-to-color":[{"mask-linear-to":z()}],"mask-image-t-from-pos":[{"mask-t-from":de()}],"mask-image-t-to-pos":[{"mask-t-to":de()}],"mask-image-t-from-color":[{"mask-t-from":z()}],"mask-image-t-to-color":[{"mask-t-to":z()}],"mask-image-r-from-pos":[{"mask-r-from":de()}],"mask-image-r-to-pos":[{"mask-r-to":de()}],"mask-image-r-from-color":[{"mask-r-from":z()}],"mask-image-r-to-color":[{"mask-r-to":z()}],"mask-image-b-from-pos":[{"mask-b-from":de()}],"mask-image-b-to-pos":[{"mask-b-to":de()}],"mask-image-b-from-color":[{"mask-b-from":z()}],"mask-image-b-to-color":[{"mask-b-to":z()}],"mask-image-l-from-pos":[{"mask-l-from":de()}],"mask-image-l-to-pos":[{"mask-l-to":de()}],"mask-image-l-from-color":[{"mask-l-from":z()}],"mask-image-l-to-color":[{"mask-l-to":z()}],"mask-image-x-from-pos":[{"mask-x-from":de()}],"mask-image-x-to-pos":[{"mask-x-to":de()}],"mask-image-x-from-color":[{"mask-x-from":z()}],"mask-image-x-to-color":[{"mask-x-to":z()}],"mask-image-y-from-pos":[{"mask-y-from":de()}],"mask-image-y-to-pos":[{"mask-y-to":de()}],"mask-image-y-from-color":[{"mask-y-from":z()}],"mask-image-y-to-color":[{"mask-y-to":z()}],"mask-image-radial":[{"mask-radial":[le,ae]}],"mask-image-radial-from-pos":[{"mask-radial-from":de()}],"mask-image-radial-to-pos":[{"mask-radial-to":de()}],"mask-image-radial-from-color":[{"mask-radial-from":z()}],"mask-image-radial-to-color":[{"mask-radial-to":z()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":A()}],"mask-image-conic-pos":[{"mask-conic":[Re]}],"mask-image-conic-from-pos":[{"mask-conic-from":de()}],"mask-image-conic-to-pos":[{"mask-conic-to":de()}],"mask-image-conic-from-color":[{"mask-conic-from":z()}],"mask-image-conic-to-color":[{"mask-conic-to":z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:W()}],"mask-size":[{mask:we()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",le,ae]}],filter:[{filter:["","none",le,ae]}],blur:[{blur:_e()}],brightness:[{brightness:[Re,le,ae]}],contrast:[{contrast:[Re,le,ae]}],"drop-shadow":[{"drop-shadow":["","none",k,Ya,Qa]}],"drop-shadow-color":[{"drop-shadow":z()}],grayscale:[{grayscale:["",Re,le,ae]}],"hue-rotate":[{"hue-rotate":[Re,le,ae]}],invert:[{invert:["",Re,le,ae]}],saturate:[{saturate:[Re,le,ae]}],sepia:[{sepia:["",Re,le,ae]}],"backdrop-filter":[{"backdrop-filter":["","none",le,ae]}],"backdrop-blur":[{"backdrop-blur":_e()}],"backdrop-brightness":[{"backdrop-brightness":[Re,le,ae]}],"backdrop-contrast":[{"backdrop-contrast":[Re,le,ae]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Re,le,ae]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Re,le,ae]}],"backdrop-invert":[{"backdrop-invert":["",Re,le,ae]}],"backdrop-opacity":[{"backdrop-opacity":[Re,le,ae]}],"backdrop-saturate":[{"backdrop-saturate":[Re,le,ae]}],"backdrop-sepia":[{"backdrop-sepia":["",Re,le,ae]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":U()}],"border-spacing-x":[{"border-spacing-x":U()}],"border-spacing-y":[{"border-spacing-y":U()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",le,ae]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Re,"initial",le,ae]}],ease:[{ease:["linear","initial",R,le,ae]}],delay:[{delay:[Re,le,ae]}],animate:[{animate:["none",P,le,ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,le,ae]}],"perspective-origin":[{"perspective-origin":D()}],rotate:[{rotate:Ne()}],"rotate-x":[{"rotate-x":Ne()}],"rotate-y":[{"rotate-y":Ne()}],"rotate-z":[{"rotate-z":Ne()}],scale:[{scale:Te()}],"scale-x":[{"scale-x":Te()}],"scale-y":[{"scale-y":Te()}],"scale-z":[{"scale-z":Te()}],"scale-3d":["scale-3d"],skew:[{skew:Ke()}],"skew-x":[{"skew-x":Ke()}],"skew-y":[{"skew-y":Ke()}],transform:[{transform:[le,ae,"","none","gpu","cpu"]}],"transform-origin":[{origin:D()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ot()}],"translate-x":[{"translate-x":ot()}],"translate-y":[{"translate-y":ot()}],"translate-z":[{"translate-z":ot()}],"translate-none":["translate-none"],accent:[{accent:z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:z()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",le,ae]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mbs":[{"scroll-mbs":U()}],"scroll-mbe":[{"scroll-mbe":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pbs":[{"scroll-pbs":U()}],"scroll-pbe":[{"scroll-pbe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",le,ae]}],fill:[{fill:["none",...z()]}],"stroke-w":[{stroke:[Re,oi,Xr,Vm]}],stroke:[{stroke:["none",...z()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},oE=MS(rE);function ft(...e){return oE(Ay(e))}const Jy=x.forwardRef(({...e},t)=>b.jsx("div",{ref:t,className:"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",...e}));Jy.displayName="ToastProvider";const Zy=x.forwardRef(({...e},t)=>b.jsx("div",{ref:t,className:"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",...e}));Zy.displayName="ToastViewport";const sE=Oy("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),ev=x.forwardRef(({className:e,variant:t,...r},s)=>b.jsx("div",{ref:s,className:ft(sE({variant:t}),e),...r}));ev.displayName="Toast";const iE=x.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:ft("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));iE.displayName="ToastAction";const tv=x.forwardRef(({className:e,...t},r)=>b.jsx("button",{ref:r,className:ft("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:b.jsx(mS,{className:"h-4 w-4"})}));tv.displayName="ToastClose";const nv=x.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:ft("text-sm font-semibold",e),...t}));nv.displayName="ToastTitle";const rv=x.forwardRef(({className:e,...t},r)=>b.jsx("div",{ref:r,className:ft("text-sm opacity-90",e),...t}));rv.displayName="ToastDescription";function aE(){const{toasts:e}=sb();return b.jsxs(Jy,{children:[e.map(function({id:t,title:r,description:s,action:a,...l}){return b.jsxs(ev,{...l,children:[b.jsxs("div",{className:"grid gap-1",children:[r&&b.jsx(nv,{children:r}),s&&b.jsx(rv,{children:s})]}),a,b.jsx(tv,{})]},t)}),b.jsx(Zy,{})]})}var _i=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},lE={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},wr,Zd,wy,cE=(wy=class{constructor(){Se(this,wr,lE);Se(this,Zd,!1)}setTimeoutProvider(e){ne(this,wr,e)}setTimeout(e,t){return O(this,wr).setTimeout(e,t)}clearTimeout(e){O(this,wr).clearTimeout(e)}setInterval(e,t){return O(this,wr).setInterval(e,t)}clearInterval(e){O(this,wr).clearInterval(e)}},wr=new WeakMap,Zd=new WeakMap,wy),Gr=new cE;function uE(e){setTimeout(e,0)}var uo=typeof window>"u"||"Deno"in globalThis;function Lt(){}function dE(e,t){return typeof e=="function"?e(t):e}function hd(e){return typeof e=="number"&&e>=0&&e!==1/0}function ov(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Nr(e,t){return typeof e=="function"?e(t):e}function Zt(e,t){return typeof e=="function"?e(t):e}function qm(e,t){const{type:r="all",exact:s,fetchStatus:a,predicate:l,queryKey:u,stale:d}=e;if(u){if(s){if(t.queryHash!==lf(u,t.options))return!1}else if(!gi(t.queryKey,u))return!1}if(r!=="all"){const h=t.isActive();if(r==="active"&&!h||r==="inactive"&&h)return!1}return!(typeof d=="boolean"&&t.isStale()!==d||a&&a!==t.state.fetchStatus||l&&!l(t))}function Km(e,t){const{exact:r,status:s,predicate:a,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(r){if(mi(t.options.mutationKey)!==mi(l))return!1}else if(!gi(t.options.mutationKey,l))return!1}return!(s&&t.state.status!==s||a&&!a(t))}function lf(e,t){return((t==null?void 0:t.queryKeyHashFn)||mi)(e)}function mi(e){return JSON.stringify(e,(t,r)=>md(r)?Object.keys(r).sort().reduce((s,a)=>(s[a]=r[a],s),{}):r)}function gi(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>gi(e[r],t[r])):!1}var fE=Object.prototype.hasOwnProperty;function sv(e,t,r=0){if(e===t)return e;if(r>500)return t;const s=Qm(e)&&Qm(t);if(!s&&!(md(e)&&md(t)))return t;const l=(s?e:Object.keys(e)).length,u=s?t:Object.keys(t),d=u.length,h=s?new Array(d):{};let m=0;for(let g=0;g{Gr.setTimeout(t,e)})}function gd(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?sv(e,t):t}function pE(e,t,r=0){const s=[...e,t];return r&&s.length>r?s.slice(1):s}function mE(e,t,r=0){const s=[t,...e];return r&&s.length>r?s.slice(0,-1):s}var cf=Symbol();function iv(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===cf?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function av(e,t){return typeof e=="function"?e(...t):!!e}function gE(e,t,r){let s=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??(a=t()),s||(s=!0,a.aborted?r():a.addEventListener("abort",r,{once:!0})),a)}),e}var eo,xr,Jo,xy,yE=(xy=class extends _i{constructor(){super();Se(this,eo);Se(this,xr);Se(this,Jo);ne(this,Jo,t=>{if(!uo&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){O(this,xr)||this.setEventListener(O(this,Jo))}onUnsubscribe(){var t;this.hasListeners()||((t=O(this,xr))==null||t.call(this),ne(this,xr,void 0))}setEventListener(t){var r;ne(this,Jo,t),(r=O(this,xr))==null||r.call(this),ne(this,xr,t(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(t){O(this,eo)!==t&&(ne(this,eo,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof O(this,eo)=="boolean"?O(this,eo):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},eo=new WeakMap,xr=new WeakMap,Jo=new WeakMap,xy),uf=new yE;function yd(){let e,t;const r=new Promise((a,l)=>{e=a,t=l});r.status="pending",r.catch(()=>{});function s(a){Object.assign(r,a),delete r.resolve,delete r.reject}return r.resolve=a=>{s({status:"fulfilled",value:a}),e(a)},r.reject=a=>{s({status:"rejected",reason:a}),t(a)},r}var vE=uE;function wE(){let e=[],t=0,r=d=>{d()},s=d=>{d()},a=vE;const l=d=>{t?e.push(d):a(()=>{r(d)})},u=()=>{const d=e;e=[],d.length&&a(()=>{s(()=>{d.forEach(h=>{r(h)})})})};return{batch:d=>{let h;t++;try{h=d()}finally{t--,t||u()}return h},batchCalls:d=>(...h)=>{l(()=>{d(...h)})},schedule:l,setNotifyFunction:d=>{r=d},setBatchNotifyFunction:d=>{s=d},setScheduler:d=>{a=d}}}var gt=wE(),Zo,br,es,by,xE=(by=class extends _i{constructor(){super();Se(this,Zo,!0);Se(this,br);Se(this,es);ne(this,es,t=>{if(!uo&&window.addEventListener){const r=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",s)}}})}onSubscribe(){O(this,br)||this.setEventListener(O(this,es))}onUnsubscribe(){var t;this.hasListeners()||((t=O(this,br))==null||t.call(this),ne(this,br,void 0))}setEventListener(t){var r;ne(this,es,t),(r=O(this,br))==null||r.call(this),ne(this,br,t(this.setOnline.bind(this)))}setOnline(t){O(this,Zo)!==t&&(ne(this,Zo,t),this.listeners.forEach(s=>{s(t)}))}isOnline(){return O(this,Zo)}},Zo=new WeakMap,br=new WeakMap,es=new WeakMap,by),xl=new xE;function bE(e){return Math.min(1e3*2**e,3e4)}function lv(e){return(e??"online")==="online"?xl.isOnline():!0}var vd=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function cv(e){let t=!1,r=0,s;const a=yd(),l=()=>a.status!=="pending",u=v=>{var S;if(!l()){const R=new vd(v);C(R),(S=e.onCancel)==null||S.call(e,R)}},d=()=>{t=!0},h=()=>{t=!1},m=()=>uf.isFocused()&&(e.networkMode==="always"||xl.isOnline())&&e.canRun(),g=()=>lv(e.networkMode)&&e.canRun(),y=v=>{l()||(s==null||s(),a.resolve(v))},C=v=>{l()||(s==null||s(),a.reject(v))},k=()=>new Promise(v=>{var S;s=R=>{(l()||m())&&v(R)},(S=e.onPause)==null||S.call(e)}).then(()=>{var v;s=void 0,l()||(v=e.onContinue)==null||v.call(e)}),E=()=>{if(l())return;let v;const S=r===0?e.initialPromise:void 0;try{v=S??e.fn()}catch(R){v=Promise.reject(R)}Promise.resolve(v).then(y).catch(R=>{var V;if(l())return;const P=e.retry??(uo?0:3),N=e.retryDelay??bE,A=typeof N=="function"?N(r,R):N,D=P===!0||typeof P=="number"&&rm()?void 0:k()).then(()=>{t?C(R):E()})})};return{promise:a,status:()=>a.status,cancel:u,continue:()=>(s==null||s(),a),cancelRetry:d,continueRetry:h,canStart:g,start:()=>(g()?E():k().then(E),a)}}var to,Sy,uv=(Sy=class{constructor(){Se(this,to)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),hd(this.gcTime)&&ne(this,to,Gr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(uo?1/0:300*1e3))}clearGcTimeout(){O(this,to)&&(Gr.clearTimeout(O(this,to)),ne(this,to,void 0))}},to=new WeakMap,Sy),no,ts,Jt,ro,dt,bi,oo,un,zn,Ey,SE=(Ey=class extends uv{constructor(t){super();Se(this,un);Se(this,no);Se(this,ts);Se(this,Jt);Se(this,ro);Se(this,dt);Se(this,bi);Se(this,oo);ne(this,oo,!1),ne(this,bi,t.defaultOptions),this.setOptions(t.options),this.observers=[],ne(this,ro,t.client),ne(this,Jt,O(this,ro).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ne(this,no,Gm(this.options)),this.state=t.state??O(this,no),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=O(this,dt))==null?void 0:t.promise}setOptions(t){if(this.options={...O(this,bi),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=Gm(this.options);r.data!==void 0&&(this.setState(Xm(r.data,r.dataUpdatedAt)),ne(this,no,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&O(this,Jt).remove(this)}setData(t,r){const s=gd(this.state.data,t,this.options);return Ae(this,un,zn).call(this,{data:s,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),s}setState(t,r){Ae(this,un,zn).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var s,a;const r=(s=O(this,dt))==null?void 0:s.promise;return(a=O(this,dt))==null||a.cancel(t),r?r.then(Lt).catch(Lt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(O(this,no))}isActive(){return this.observers.some(t=>Zt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===cf||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Nr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!ov(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(s=>s.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=O(this,dt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(s=>s.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=O(this,dt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),O(this,Jt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(O(this,dt)&&(O(this,oo)?O(this,dt).cancel({revert:!0}):O(this,dt).cancelRetry()),this.scheduleGc()),O(this,Jt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ae(this,un,zn).call(this,{type:"invalidate"})}async fetch(t,r){var h,m,g,y,C,k,E,v,S,R,P,N;if(this.state.fetchStatus!=="idle"&&((h=O(this,dt))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(O(this,dt))return O(this,dt).continueRetry(),O(this,dt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const A=this.observers.find(D=>D.options.queryFn);A&&this.setOptions(A.options)}const s=new AbortController,a=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(ne(this,oo,!0),s.signal)})},l=()=>{const A=iv(this.options,r),V=(()=>{const H={client:O(this,ro),queryKey:this.queryKey,meta:this.meta};return a(H),H})();return ne(this,oo,!1),this.options.persister?this.options.persister(A,V,this):A(V)},d=(()=>{const A={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:O(this,ro),state:this.state,fetchFn:l};return a(A),A})();(m=this.options.behavior)==null||m.onFetch(d,this),ne(this,ts,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((g=d.fetchOptions)==null?void 0:g.meta))&&Ae(this,un,zn).call(this,{type:"fetch",meta:(y=d.fetchOptions)==null?void 0:y.meta}),ne(this,dt,cv({initialPromise:r==null?void 0:r.initialPromise,fn:d.fetchFn,onCancel:A=>{A instanceof vd&&A.revert&&this.setState({...O(this,ts),fetchStatus:"idle"}),s.abort()},onFail:(A,D)=>{Ae(this,un,zn).call(this,{type:"failed",failureCount:A,error:D})},onPause:()=>{Ae(this,un,zn).call(this,{type:"pause"})},onContinue:()=>{Ae(this,un,zn).call(this,{type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0}));try{const A=await O(this,dt).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(k=(C=O(this,Jt).config).onSuccess)==null||k.call(C,A,this),(v=(E=O(this,Jt).config).onSettled)==null||v.call(E,A,this.state.error,this),A}catch(A){if(A instanceof vd){if(A.silent)return O(this,dt).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw Ae(this,un,zn).call(this,{type:"error",error:A}),(R=(S=O(this,Jt).config).onError)==null||R.call(S,A,this),(N=(P=O(this,Jt).config).onSettled)==null||N.call(P,this.state.data,A,this),A}finally{this.scheduleGc()}}},no=new WeakMap,ts=new WeakMap,Jt=new WeakMap,ro=new WeakMap,dt=new WeakMap,bi=new WeakMap,oo=new WeakMap,un=new WeakSet,zn=function(t){const r=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...dv(s.data,this.options),fetchMeta:t.meta??null};case"success":const a={...s,...Xm(t.data,t.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ne(this,ts,t.manual?a:void 0),a;case"error":const l=t.error;return{...s,error:l,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=r(this.state),gt.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),O(this,Jt).notify({query:this,type:"updated",action:t})})},Ey);function dv(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:lv(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Xm(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Gm(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,s=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var jt,Oe,Si,_t,so,ns,$n,Sr,Ei,rs,os,io,ao,Er,ss,De,li,wd,xd,bd,Sd,Ed,Cd,kd,fv,Cy,EE=(Cy=class extends _i{constructor(t,r){super();Se(this,De);Se(this,jt);Se(this,Oe);Se(this,Si);Se(this,_t);Se(this,so);Se(this,ns);Se(this,$n);Se(this,Sr);Se(this,Ei);Se(this,rs);Se(this,os);Se(this,io);Se(this,ao);Se(this,Er);Se(this,ss,new Set);this.options=r,ne(this,jt,t),ne(this,Sr,null),ne(this,$n,yd()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(O(this,Oe).addObserver(this),Jm(O(this,Oe),this.options)?Ae(this,De,li).call(this):this.updateResult(),Ae(this,De,Sd).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return _d(O(this,Oe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return _d(O(this,Oe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ae(this,De,Ed).call(this),Ae(this,De,Cd).call(this),O(this,Oe).removeObserver(this)}setOptions(t){const r=this.options,s=O(this,Oe);if(this.options=O(this,jt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Zt(this.options.enabled,O(this,Oe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ae(this,De,kd).call(this),O(this,Oe).setOptions(this.options),r._defaulted&&!pd(this.options,r)&&O(this,jt).getQueryCache().notify({type:"observerOptionsUpdated",query:O(this,Oe),observer:this});const a=this.hasListeners();a&&Zm(O(this,Oe),s,this.options,r)&&Ae(this,De,li).call(this),this.updateResult(),a&&(O(this,Oe)!==s||Zt(this.options.enabled,O(this,Oe))!==Zt(r.enabled,O(this,Oe))||Nr(this.options.staleTime,O(this,Oe))!==Nr(r.staleTime,O(this,Oe)))&&Ae(this,De,wd).call(this);const l=Ae(this,De,xd).call(this);a&&(O(this,Oe)!==s||Zt(this.options.enabled,O(this,Oe))!==Zt(r.enabled,O(this,Oe))||l!==O(this,Er))&&Ae(this,De,bd).call(this,l)}getOptimisticResult(t){const r=O(this,jt).getQueryCache().build(O(this,jt),t),s=this.createResult(r,t);return kE(this,s)&&(ne(this,_t,s),ne(this,ns,this.options),ne(this,so,O(this,Oe).state)),s}getCurrentResult(){return O(this,_t)}trackResult(t,r){return new Proxy(t,{get:(s,a)=>(this.trackProp(a),r==null||r(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&O(this,$n).status==="pending"&&O(this,$n).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,a))})}trackProp(t){O(this,ss).add(t)}getCurrentQuery(){return O(this,Oe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=O(this,jt).defaultQueryOptions(t),s=O(this,jt).getQueryCache().build(O(this,jt),r);return s.fetch().then(()=>this.createResult(s,r))}fetch(t){return Ae(this,De,li).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),O(this,_t)))}createResult(t,r){var X;const s=O(this,Oe),a=this.options,l=O(this,_t),u=O(this,so),d=O(this,ns),m=t!==s?t.state:O(this,Si),{state:g}=t;let y={...g},C=!1,k;if(r._optimisticResults){const re=this.hasListeners(),ee=!re&&Jm(t,r),he=re&&Zm(t,s,r,a);(ee||he)&&(y={...y,...dv(g.data,t.options)}),r._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:E,errorUpdatedAt:v,status:S}=y;k=y.data;let R=!1;if(r.placeholderData!==void 0&&k===void 0&&S==="pending"){let re;l!=null&&l.isPlaceholderData&&r.placeholderData===(d==null?void 0:d.placeholderData)?(re=l.data,R=!0):re=typeof r.placeholderData=="function"?r.placeholderData((X=O(this,os))==null?void 0:X.state.data,O(this,os)):r.placeholderData,re!==void 0&&(S="success",k=gd(l==null?void 0:l.data,re,r),C=!0)}if(r.select&&k!==void 0&&!R)if(l&&k===(u==null?void 0:u.data)&&r.select===O(this,Ei))k=O(this,rs);else try{ne(this,Ei,r.select),k=r.select(k),k=gd(l==null?void 0:l.data,k,r),ne(this,rs,k),ne(this,Sr,null)}catch(re){ne(this,Sr,re)}O(this,Sr)&&(E=O(this,Sr),k=O(this,rs),v=Date.now(),S="error");const P=y.fetchStatus==="fetching",N=S==="pending",A=S==="error",D=N&&P,V=k!==void 0,U={status:S,fetchStatus:y.fetchStatus,isPending:N,isSuccess:S==="success",isError:A,isInitialLoading:D,isLoading:D,data:k,dataUpdatedAt:y.dataUpdatedAt,error:E,errorUpdatedAt:v,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:y.dataUpdateCount>0||y.errorUpdateCount>0,isFetchedAfterMount:y.dataUpdateCount>m.dataUpdateCount||y.errorUpdateCount>m.errorUpdateCount,isFetching:P,isRefetching:P&&!N,isLoadingError:A&&!V,isPaused:y.fetchStatus==="paused",isPlaceholderData:C,isRefetchError:A&&V,isStale:df(t,r),refetch:this.refetch,promise:O(this,$n),isEnabled:Zt(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const re=U.data!==void 0,ee=U.status==="error"&&!re,he=Ee=>{ee?Ee.reject(U.error):re&&Ee.resolve(U.data)},ve=()=>{const Ee=ne(this,$n,U.promise=yd());he(Ee)},ue=O(this,$n);switch(ue.status){case"pending":t.queryHash===s.queryHash&&he(ue);break;case"fulfilled":(ee||U.data!==ue.value)&&ve();break;case"rejected":(!ee||U.error!==ue.reason)&&ve();break}}return U}updateResult(){const t=O(this,_t),r=this.createResult(O(this,Oe),this.options);if(ne(this,so,O(this,Oe).state),ne(this,ns,this.options),O(this,so).data!==void 0&&ne(this,os,O(this,Oe)),pd(r,t))return;ne(this,_t,r);const s=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,l=typeof a=="function"?a():a;if(l==="all"||!l&&!O(this,ss).size)return!0;const u=new Set(l??O(this,ss));return this.options.throwOnError&&u.add("error"),Object.keys(O(this,_t)).some(d=>{const h=d;return O(this,_t)[h]!==t[h]&&u.has(h)})};Ae(this,De,fv).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ae(this,De,Sd).call(this)}},jt=new WeakMap,Oe=new WeakMap,Si=new WeakMap,_t=new WeakMap,so=new WeakMap,ns=new WeakMap,$n=new WeakMap,Sr=new WeakMap,Ei=new WeakMap,rs=new WeakMap,os=new WeakMap,io=new WeakMap,ao=new WeakMap,Er=new WeakMap,ss=new WeakMap,De=new WeakSet,li=function(t){Ae(this,De,kd).call(this);let r=O(this,Oe).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Lt)),r},wd=function(){Ae(this,De,Ed).call(this);const t=Nr(this.options.staleTime,O(this,Oe));if(uo||O(this,_t).isStale||!hd(t))return;const s=ov(O(this,_t).dataUpdatedAt,t)+1;ne(this,io,Gr.setTimeout(()=>{O(this,_t).isStale||this.updateResult()},s))},xd=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(O(this,Oe)):this.options.refetchInterval)??!1},bd=function(t){Ae(this,De,Cd).call(this),ne(this,Er,t),!(uo||Zt(this.options.enabled,O(this,Oe))===!1||!hd(O(this,Er))||O(this,Er)===0)&&ne(this,ao,Gr.setInterval(()=>{(this.options.refetchIntervalInBackground||uf.isFocused())&&Ae(this,De,li).call(this)},O(this,Er)))},Sd=function(){Ae(this,De,wd).call(this),Ae(this,De,bd).call(this,Ae(this,De,xd).call(this))},Ed=function(){O(this,io)&&(Gr.clearTimeout(O(this,io)),ne(this,io,void 0))},Cd=function(){O(this,ao)&&(Gr.clearInterval(O(this,ao)),ne(this,ao,void 0))},kd=function(){const t=O(this,jt).getQueryCache().build(O(this,jt),this.options);if(t===O(this,Oe))return;const r=O(this,Oe);ne(this,Oe,t),ne(this,Si,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},fv=function(t){gt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(O(this,_t))}),O(this,jt).getQueryCache().notify({query:O(this,Oe),type:"observerResultsUpdated"})})},Cy);function CE(e,t){return Zt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Jm(e,t){return CE(e,t)||e.state.data!==void 0&&_d(e,t,t.refetchOnMount)}function _d(e,t,r){if(Zt(t.enabled,e)!==!1&&Nr(t.staleTime,e)!=="static"){const s=typeof r=="function"?r(e):r;return s==="always"||s!==!1&&df(e,t)}return!1}function Zm(e,t,r,s){return(e!==t||Zt(s.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&df(e,r)}function df(e,t){return Zt(t.enabled,e)!==!1&&e.isStaleByTime(Nr(t.staleTime,e))}function kE(e,t){return!pd(e.getCurrentResult(),t)}function eg(e){return{onFetch:(t,r)=>{var g,y,C,k,E;const s=t.options,a=(C=(y=(g=t.fetchOptions)==null?void 0:g.meta)==null?void 0:y.fetchMore)==null?void 0:C.direction,l=((k=t.state.data)==null?void 0:k.pages)||[],u=((E=t.state.data)==null?void 0:E.pageParams)||[];let d={pages:[],pageParams:[]},h=0;const m=async()=>{let v=!1;const S=N=>{gE(N,()=>t.signal,()=>v=!0)},R=iv(t.options,t.fetchOptions),P=async(N,A,D)=>{if(v)return Promise.reject();if(A==null&&N.pages.length)return Promise.resolve(N);const H=(()=>{const ee={client:t.client,queryKey:t.queryKey,pageParam:A,direction:D?"backward":"forward",meta:t.options.meta};return S(ee),ee})(),U=await R(H),{maxPages:X}=t.options,re=D?mE:pE;return{pages:re(N.pages,U,X),pageParams:re(N.pageParams,A,X)}};if(a&&l.length){const N=a==="backward",A=N?_E:tg,D={pages:l,pageParams:u},V=A(s,D);d=await P(D,V,N)}else{const N=e??l.length;do{const A=h===0?u[0]??s.initialPageParam:tg(s,d);if(h>0&&A==null)break;d=await P(d,A),h++}while(h{var v,S;return(S=(v=t.options).persister)==null?void 0:S.call(v,m,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=m}}}function tg(e,{pages:t,pageParams:r}){const s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,r[s],r):void 0}function _E(e,{pages:t,pageParams:r}){var s;return t.length>0?(s=e.getPreviousPageParam)==null?void 0:s.call(e,t[0],t,r[0],r):void 0}var Ci,bn,bt,lo,Sn,yr,ky,RE=(ky=class extends uv{constructor(t){super();Se(this,Sn);Se(this,Ci);Se(this,bn);Se(this,bt);Se(this,lo);ne(this,Ci,t.client),this.mutationId=t.mutationId,ne(this,bt,t.mutationCache),ne(this,bn,[]),this.state=t.state||NE(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){O(this,bn).includes(t)||(O(this,bn).push(t),this.clearGcTimeout(),O(this,bt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ne(this,bn,O(this,bn).filter(r=>r!==t)),this.scheduleGc(),O(this,bt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){O(this,bn).length||(this.state.status==="pending"?this.scheduleGc():O(this,bt).remove(this))}continue(){var t;return((t=O(this,lo))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var u,d,h,m,g,y,C,k,E,v,S,R,P,N,A,D,V,H;const r=()=>{Ae(this,Sn,yr).call(this,{type:"continue"})},s={client:O(this,Ci),meta:this.options.meta,mutationKey:this.options.mutationKey};ne(this,lo,cv({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(new Error("No mutationFn found")),onFail:(U,X)=>{Ae(this,Sn,yr).call(this,{type:"failed",failureCount:U,error:X})},onPause:()=>{Ae(this,Sn,yr).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>O(this,bt).canRun(this)}));const a=this.state.status==="pending",l=!O(this,lo).canStart();try{if(a)r();else{Ae(this,Sn,yr).call(this,{type:"pending",variables:t,isPaused:l}),O(this,bt).config.onMutate&&await O(this,bt).config.onMutate(t,this,s);const X=await((d=(u=this.options).onMutate)==null?void 0:d.call(u,t,s));X!==this.state.context&&Ae(this,Sn,yr).call(this,{type:"pending",context:X,variables:t,isPaused:l})}const U=await O(this,lo).start();return await((m=(h=O(this,bt).config).onSuccess)==null?void 0:m.call(h,U,t,this.state.context,this,s)),await((y=(g=this.options).onSuccess)==null?void 0:y.call(g,U,t,this.state.context,s)),await((k=(C=O(this,bt).config).onSettled)==null?void 0:k.call(C,U,null,this.state.variables,this.state.context,this,s)),await((v=(E=this.options).onSettled)==null?void 0:v.call(E,U,null,t,this.state.context,s)),Ae(this,Sn,yr).call(this,{type:"success",data:U}),U}catch(U){try{await((R=(S=O(this,bt).config).onError)==null?void 0:R.call(S,U,t,this.state.context,this,s))}catch(X){Promise.reject(X)}try{await((N=(P=this.options).onError)==null?void 0:N.call(P,U,t,this.state.context,s))}catch(X){Promise.reject(X)}try{await((D=(A=O(this,bt).config).onSettled)==null?void 0:D.call(A,void 0,U,this.state.variables,this.state.context,this,s))}catch(X){Promise.reject(X)}try{await((H=(V=this.options).onSettled)==null?void 0:H.call(V,void 0,U,t,this.state.context,s))}catch(X){Promise.reject(X)}throw Ae(this,Sn,yr).call(this,{type:"error",error:U}),U}finally{O(this,bt).runNext(this)}}},Ci=new WeakMap,bn=new WeakMap,bt=new WeakMap,lo=new WeakMap,Sn=new WeakSet,yr=function(t){const r=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),gt.batch(()=>{O(this,bn).forEach(s=>{s.onMutationUpdate(t)}),O(this,bt).notify({mutation:this,type:"updated",action:t})})},ky);function NE(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Vn,dn,ki,_y,PE=(_y=class extends _i{constructor(t={}){super();Se(this,Vn);Se(this,dn);Se(this,ki);this.config=t,ne(this,Vn,new Set),ne(this,dn,new Map),ne(this,ki,0)}build(t,r,s){const a=new RE({client:t,mutationCache:this,mutationId:++qa(this,ki)._,options:t.defaultMutationOptions(r),state:s});return this.add(a),a}add(t){O(this,Vn).add(t);const r=Xa(t);if(typeof r=="string"){const s=O(this,dn).get(r);s?s.push(t):O(this,dn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(O(this,Vn).delete(t)){const r=Xa(t);if(typeof r=="string"){const s=O(this,dn).get(r);if(s)if(s.length>1){const a=s.indexOf(t);a!==-1&&s.splice(a,1)}else s[0]===t&&O(this,dn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Xa(t);if(typeof r=="string"){const s=O(this,dn).get(r),a=s==null?void 0:s.find(l=>l.state.status==="pending");return!a||a===t}else return!0}runNext(t){var s;const r=Xa(t);if(typeof r=="string"){const a=(s=O(this,dn).get(r))==null?void 0:s.find(l=>l!==t&&l.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){gt.batch(()=>{O(this,Vn).forEach(t=>{this.notify({type:"removed",mutation:t})}),O(this,Vn).clear(),O(this,dn).clear()})}getAll(){return Array.from(O(this,Vn))}find(t){const r={exact:!0,...t};return this.getAll().find(s=>Km(r,s))}findAll(t={}){return this.getAll().filter(r=>Km(t,r))}notify(t){gt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return gt.batch(()=>Promise.all(t.map(r=>r.continue().catch(Lt))))}},Vn=new WeakMap,dn=new WeakMap,ki=new WeakMap,_y);function Xa(e){var t;return(t=e.options.scope)==null?void 0:t.id}var En,Ry,TE=(Ry=class extends _i{constructor(t={}){super();Se(this,En);this.config=t,ne(this,En,new Map)}build(t,r,s){const a=r.queryKey,l=r.queryHash??lf(a,r);let u=this.get(l);return u||(u=new SE({client:t,queryKey:a,queryHash:l,options:t.defaultQueryOptions(r),state:s,defaultOptions:t.getQueryDefaults(a)}),this.add(u)),u}add(t){O(this,En).has(t.queryHash)||(O(this,En).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=O(this,En).get(t.queryHash);r&&(t.destroy(),r===t&&O(this,En).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){gt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return O(this,En).get(t)}getAll(){return[...O(this,En).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(s=>qm(r,s))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(s=>qm(t,s)):r}notify(t){gt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){gt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){gt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},En=new WeakMap,Ry),Ye,Cr,kr,is,as,_r,ls,cs,Ny,AE=(Ny=class{constructor(e={}){Se(this,Ye);Se(this,Cr);Se(this,kr);Se(this,is);Se(this,as);Se(this,_r);Se(this,ls);Se(this,cs);ne(this,Ye,e.queryCache||new TE),ne(this,Cr,e.mutationCache||new PE),ne(this,kr,e.defaultOptions||{}),ne(this,is,new Map),ne(this,as,new Map),ne(this,_r,0)}mount(){qa(this,_r)._++,O(this,_r)===1&&(ne(this,ls,uf.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,Ye).onFocus())})),ne(this,cs,xl.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,Ye).onOnline())})))}unmount(){var e,t;qa(this,_r)._--,O(this,_r)===0&&((e=O(this,ls))==null||e.call(this),ne(this,ls,void 0),(t=O(this,cs))==null||t.call(this),ne(this,cs,void 0))}isFetching(e){return O(this,Ye).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return O(this,Cr).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=O(this,Ye).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=O(this,Ye).build(this,t),s=r.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Nr(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return O(this,Ye).findAll(e).map(({queryKey:t,state:r})=>{const s=r.data;return[t,s]})}setQueryData(e,t,r){const s=this.defaultQueryOptions({queryKey:e}),a=O(this,Ye).get(s.queryHash),l=a==null?void 0:a.state.data,u=dE(t,l);if(u!==void 0)return O(this,Ye).build(this,s).setData(u,{...r,manual:!0})}setQueriesData(e,t,r){return gt.batch(()=>O(this,Ye).findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=O(this,Ye).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=O(this,Ye);gt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=O(this,Ye);return gt.batch(()=>(r.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},s=gt.batch(()=>O(this,Ye).findAll(e).map(a=>a.cancel(r)));return Promise.all(s).then(Lt).catch(Lt)}invalidateQueries(e,t={}){return gt.batch(()=>(O(this,Ye).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},s=gt.batch(()=>O(this,Ye).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let l=a.fetch(void 0,r);return r.throwOnError||(l=l.catch(Lt)),a.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(s).then(Lt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=O(this,Ye).build(this,t);return r.isStaleByTime(Nr(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Lt).catch(Lt)}fetchInfiniteQuery(e){return e.behavior=eg(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Lt).catch(Lt)}ensureInfiniteQueryData(e){return e.behavior=eg(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return xl.isOnline()?O(this,Cr).resumePausedMutations():Promise.resolve()}getQueryCache(){return O(this,Ye)}getMutationCache(){return O(this,Cr)}getDefaultOptions(){return O(this,kr)}setDefaultOptions(e){ne(this,kr,e)}setQueryDefaults(e,t){O(this,is).set(mi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...O(this,is).values()],r={};return t.forEach(s=>{gi(e,s.queryKey)&&Object.assign(r,s.defaultOptions)}),r}setMutationDefaults(e,t){O(this,as).set(mi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...O(this,as).values()],r={};return t.forEach(s=>{gi(e,s.mutationKey)&&Object.assign(r,s.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...O(this,kr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=lf(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===cf&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...O(this,kr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){O(this,Ye).clear(),O(this,Cr).clear()}},Ye=new WeakMap,Cr=new WeakMap,kr=new WeakMap,is=new WeakMap,as=new WeakMap,_r=new WeakMap,ls=new WeakMap,cs=new WeakMap,Ny),hv=x.createContext(void 0),OE=e=>{const t=x.useContext(hv);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},jE=({client:e,children:t})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),b.jsx(hv.Provider,{value:e,children:t})),pv=x.createContext(!1),LE=()=>x.useContext(pv);pv.Provider;function IE(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var ME=x.createContext(IE()),DE=()=>x.useContext(ME),FE=(e,t,r)=>{const s=r!=null&&r.state.error&&typeof e.throwOnError=="function"?av(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||s)&&(t.isReset()||(e.retryOnMount=!1))},UE=e=>{x.useEffect(()=>{e.clearReset()},[e])},BE=({result:e,errorResetBoundary:t,throwOnError:r,query:s,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(a&&e.data===void 0||av(r,[e.error,s])),zE=e=>{if(e.suspense){const r=a=>a==="static"?a:Math.max(a??1e3,1e3),s=e.staleTime;e.staleTime=typeof s=="function"?(...a)=>r(s(...a)):r(s),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},$E=(e,t)=>e.isLoading&&e.isFetching&&!t,VE=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,ng=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function HE(e,t,r){var C,k,E,v;const s=LE(),a=DE(),l=OE(),u=l.defaultQueryOptions(e);(k=(C=l.getDefaultOptions().queries)==null?void 0:C._experimental_beforeQuery)==null||k.call(C,u);const d=l.getQueryCache().get(u.queryHash);u._optimisticResults=s?"isRestoring":"optimistic",zE(u),FE(u,a,d),UE(a);const h=!l.getQueryCache().get(u.queryHash),[m]=x.useState(()=>new t(l,u)),g=m.getOptimisticResult(u),y=!s&&e.subscribed!==!1;if(x.useSyncExternalStore(x.useCallback(S=>{const R=y?m.subscribe(gt.batchCalls(S)):Lt;return m.updateResult(),R},[m,y]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),x.useEffect(()=>{m.setOptions(u)},[u,m]),VE(u,g))throw ng(u,m,a);if(BE({result:g,errorResetBoundary:a,throwOnError:u.throwOnError,query:d,suspense:u.suspense}))throw g.error;if((v=(E=l.getDefaultOptions().queries)==null?void 0:E._experimental_afterQuery)==null||v.call(E,u,g),u.experimental_prefetchInRender&&!uo&&$E(g,s)){const S=h?ng(u,m,a):d==null?void 0:d.promise;S==null||S.catch(Lt).finally(()=>{m.updateResult()})}return u.notifyOnChangeProps?g:m.trackResult(g)}function WE(e,t){return HE(e,EE)}const qE=new AE({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});var Ri=Py();const KE=ef(Ri);/** * @remix-run/router v1.23.2 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function yi(){return yi=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function ff(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function YE(){return Math.random().toString(36).substr(2,8)}function og(e,t){return{usr:e.state,key:e.key,idx:t}}function Rd(e,t,r,s){return r===void 0&&(r=null),yi({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?fs(t):t,{state:r,key:t&&t.key||s||YE()})}function bl(e){let{pathname:t="/",search:r="",hash:s=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),s&&s!=="#"&&(t+=s.charAt(0)==="#"?s:"#"+s),t}function fs(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let s=e.indexOf("?");s>=0&&(t.search=e.substr(s),e=e.substr(0,s)),e&&(t.pathname=e)}return t}function XE(e,t,r,s){s===void 0&&(s={});let{window:a=document.defaultView,v5Compat:l=!1}=s,u=a.history,d=Rr.Pop,h=null,m=g();m==null&&(m=0,u.replaceState(yi({},u.state,{idx:m}),""));function g(){return(u.state||{idx:null}).idx}function y(){d=Rr.Pop;let S=g(),R=S==null?null:S-m;m=S,h&&h({action:d,location:v.location,delta:R})}function C(S,R){d=Rr.Push;let P=Rd(v.location,S,R);m=g()+1;let N=og(P,m),A=v.createHref(P);try{u.pushState(N,"",A)}catch(D){if(D instanceof DOMException&&D.name==="DataCloneError")throw D;a.location.assign(A)}l&&h&&h({action:d,location:v.location,delta:1})}function k(S,R){d=Rr.Replace;let P=Rd(v.location,S,R);m=g();let N=og(P,m),A=v.createHref(P);u.replaceState(N,"",A),l&&h&&h({action:d,location:v.location,delta:0})}function E(S){let R=a.location.origin!=="null"?a.location.origin:a.location.href,P=typeof S=="string"?S:bl(S);return P=P.replace(/ $/,"%20"),nt(R,"No window.location.(origin|href) available to create URL for href: "+P),new URL(P,R)}let v={get action(){return d},get location(){return e(a,u)},listen(S){if(h)throw new Error("A history only accepts one active listener");return a.addEventListener(rg,y),h=S,()=>{a.removeEventListener(rg,y),h=null}},createHref(S){return t(a,S)},createURL:E,encodeLocation(S){let R=E(S);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:C,replace:k,go(S){return u.go(S)}};return v}var sg;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(sg||(sg={}));function GE(e,t,r){return r===void 0&&(r="/"),JE(e,t,r)}function JE(e,t,r,s){let a=typeof t=="string"?fs(t):t,l=hf(a.pathname||"/",r);if(l==null)return null;let u=mv(e);ZE(u);let d=null;for(let h=0;d==null&&h{let h={relativePath:d===void 0?l.path||"":d,caseSensitive:l.caseSensitive===!0,childrenIndex:u,route:l};h.relativePath.startsWith("/")&&(nt(h.relativePath.startsWith(s),'Absolute route path "'+h.relativePath+'" nested under path '+('"'+s+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),h.relativePath=h.relativePath.slice(s.length));let m=Pr([s,h.relativePath]),g=r.concat(h);l.children&&l.children.length>0&&(nt(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+m+'".')),mv(l.children,t,g,m)),!(l.path==null&&!l.index)&&t.push({path:m,score:iC(m,l.index),routesMeta:g})};return e.forEach((l,u)=>{var d;if(l.path===""||!((d=l.path)!=null&&d.includes("?")))a(l,u);else for(let h of gv(l.path))a(l,u,h)}),t}function gv(e){let t=e.split("/");if(t.length===0)return[];let[r,...s]=t,a=r.endsWith("?"),l=r.replace(/\?$/,"");if(s.length===0)return a?[l,""]:[l];let u=gv(s.join("/")),d=[];return d.push(...u.map(h=>h===""?l:[l,h].join("/"))),a&&d.push(...u),d.map(h=>e.startsWith("/")&&h===""?"/":h)}function ZE(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:aC(t.routesMeta.map(s=>s.childrenIndex),r.routesMeta.map(s=>s.childrenIndex)))}const eC=/^:[\w-]+$/,tC=3,nC=2,rC=1,oC=10,sC=-2,ig=e=>e==="*";function iC(e,t){let r=e.split("/"),s=r.length;return r.some(ig)&&(s+=sC),t&&(s+=nC),r.filter(a=>!ig(a)).reduce((a,l)=>a+(eC.test(l)?tC:l===""?rC:oC),s)}function aC(e,t){return e.length===t.length&&e.slice(0,-1).every((s,a)=>s===t[a])?e[e.length-1]-t[t.length-1]:0}function lC(e,t,r){let{routesMeta:s}=e,a={},l="/",u=[];for(let d=0;d{let{paramName:C,isOptional:k}=g;if(C==="*"){let v=d[y]||"";u=l.slice(0,l.length-v.length).replace(/(.)\/+$/,"$1")}const E=d[y];return k&&!E?m[C]=void 0:m[C]=(E||"").replace(/%2F/g,"/"),m},{}),pathname:l,pathnameBase:u,pattern:e}}function uC(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),ff(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let s=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,d,h)=>(s.push({paramName:d,isOptional:h!=null}),h?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(s.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),s]}function dC(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ff(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function hf(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,s=e.charAt(r);return s&&s!=="/"?null:e.slice(r)||"/"}const fC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,hC=e=>fC.test(e);function pC(e,t){t===void 0&&(t="/");let{pathname:r,search:s="",hash:a=""}=typeof e=="string"?fs(e):e,l;if(r)if(hC(r))l=r;else{if(r.includes("//")){let u=r;r=r.replace(/\/\/+/g,"/"),ff(!1,"Pathnames cannot have embedded double slashes - normalizing "+(u+" -> "+r))}r.startsWith("/")?l=ag(r.substring(1),"/"):l=ag(r,t)}else l=t;return{pathname:l,search:yC(s),hash:vC(a)}}function ag(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function Ku(e,t,r,s){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(s)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function mC(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function yv(e,t){let r=mC(e);return t?r.map((s,a)=>a===r.length-1?s.pathname:s.pathnameBase):r.map(s=>s.pathnameBase)}function vv(e,t,r,s){s===void 0&&(s=!1);let a;typeof e=="string"?a=fs(e):(a=yi({},e),nt(!a.pathname||!a.pathname.includes("?"),Ku("?","pathname","search",a)),nt(!a.pathname||!a.pathname.includes("#"),Ku("#","pathname","hash",a)),nt(!a.search||!a.search.includes("#"),Ku("#","search","hash",a)));let l=e===""||a.pathname==="",u=l?"/":a.pathname,d;if(u==null)d=r;else{let y=t.length-1;if(!s&&u.startsWith("..")){let C=u.split("/");for(;C[0]==="..";)C.shift(),y-=1;a.pathname=C.join("/")}d=y>=0?t[y]:"/"}let h=pC(a,d),m=u&&u!=="/"&&u.endsWith("/"),g=(l||u===".")&&r.endsWith("/");return!h.pathname.endsWith("/")&&(m||g)&&(h.pathname+="/"),h}const Pr=e=>e.join("/").replace(/\/\/+/g,"/"),gC=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),yC=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,vC=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function wC(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const wv=["post","put","patch","delete"];new Set(wv);const xC=["get",...wv];new Set(xC);/** * React Router v6.30.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function vi(){return vi=Object.assign?Object.assign.bind():function(e){for(var t=1;t{d.current=!0}),x.useCallback(function(m,g){if(g===void 0&&(g={}),!d.current)return;if(typeof m=="number"){s.go(m);return}let y=vv(m,JSON.parse(u),l,g.relative==="path");e==null&&t!=="/"&&(y.pathname=y.pathname==="/"?t:Pr([t,y.pathname])),(g.replace?s.replace:s.push)(y,g.state,g)},[t,s,u,l,e])}function Sv(e,t){let{relative:r}=t===void 0?{}:t,{future:s}=x.useContext(vo),{matches:a}=x.useContext(wo),{pathname:l}=Pi(),u=JSON.stringify(yv(a,s.v7_relativeSplatPath));return x.useMemo(()=>vv(e,JSON.parse(u),l,r==="path"),[e,u,l,r])}function kC(e,t){return _C(e,t)}function _C(e,t,r,s){Ni()||nt(!1);let{navigator:a}=x.useContext(vo),{matches:l}=x.useContext(wo),u=l[l.length-1],d=u?u.params:{};u&&u.pathname;let h=u?u.pathnameBase:"/";u&&u.route;let m=Pi(),g;if(t){var y;let S=typeof t=="string"?fs(t):t;h==="/"||(y=S.pathname)!=null&&y.startsWith(h)||nt(!1),g=S}else g=m;let C=g.pathname||"/",k=C;if(h!=="/"){let S=h.replace(/^\//,"").split("/");k="/"+C.replace(/^\//,"").split("/").slice(S.length).join("/")}let E=GE(e,{pathname:k}),v=AC(E&&E.map(S=>Object.assign({},S,{params:Object.assign({},d,S.params),pathname:Pr([h,a.encodeLocation?a.encodeLocation(S.pathname).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?h:Pr([h,a.encodeLocation?a.encodeLocation(S.pathnameBase).pathname:S.pathnameBase])})),l,r,s);return t&&v?x.createElement(Tl.Provider,{value:{location:vi({pathname:"/",search:"",hash:"",state:null,key:"default"},g),navigationType:Rr.Pop}},v):v}function RC(){let e=IC(),t=wC(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),r?x.createElement("pre",{style:a},r):null,null)}const NC=x.createElement(RC,null);class PC extends x.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?x.createElement(wo.Provider,{value:this.props.routeContext},x.createElement(xv.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function TC(e){let{routeContext:t,match:r,children:s}=e,a=x.useContext(pf);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),x.createElement(wo.Provider,{value:t},s)}function AC(e,t,r,s){var a;if(t===void 0&&(t=[]),r===void 0&&(r=null),s===void 0&&(s=null),e==null){var l;if(!r)return null;if(r.errors)e=r.matches;else if((l=s)!=null&&l.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let u=e,d=(a=r)==null?void 0:a.errors;if(d!=null){let g=u.findIndex(y=>y.route.id&&(d==null?void 0:d[y.route.id])!==void 0);g>=0||nt(!1),u=u.slice(0,Math.min(u.length,g+1))}let h=!1,m=-1;if(r&&s&&s.v7_partialHydration)for(let g=0;g=0?u=u.slice(0,m+1):u=[u[0]];break}}}return u.reduceRight((g,y,C)=>{let k,E=!1,v=null,S=null;r&&(k=d&&y.route.id?d[y.route.id]:void 0,v=y.route.errorElement||NC,h&&(m<0&&C===0?(DC("route-fallback"),E=!0,S=null):m===C&&(E=!0,S=y.route.hydrateFallbackElement||null)));let R=t.concat(u.slice(0,C+1)),P=()=>{let N;return k?N=v:E?N=S:y.route.Component?N=x.createElement(y.route.Component,null):y.route.element?N=y.route.element:N=g,x.createElement(TC,{match:y,routeContext:{outlet:g,matches:R,isDataRoute:r!=null},children:N})};return r&&(y.route.ErrorBoundary||y.route.errorElement||C===0)?x.createElement(PC,{location:r.location,revalidation:r.revalidation,component:v,error:k,children:P(),routeContext:{outlet:null,matches:R,isDataRoute:!0}}):P()},null)}var Ev=(function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e})(Ev||{}),Cv=(function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e})(Cv||{});function OC(e){let t=x.useContext(pf);return t||nt(!1),t}function jC(e){let t=x.useContext(bC);return t||nt(!1),t}function LC(e){let t=x.useContext(wo);return t||nt(!1),t}function kv(e){let t=LC(),r=t.matches[t.matches.length-1];return r.route.id||nt(!1),r.route.id}function IC(){var e;let t=x.useContext(xv),r=jC(),s=kv();return t!==void 0?t:(e=r.errors)==null?void 0:e[s]}function MC(){let{router:e}=OC(Ev.UseNavigateStable),t=kv(Cv.UseNavigateStable),r=x.useRef(!1);return bv(()=>{r.current=!0}),x.useCallback(function(a,l){l===void 0&&(l={}),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,vi({fromRouteId:t},l)))},[e,t])}const lg={};function DC(e,t,r){lg[e]||(lg[e]=!0)}function FC(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function ll(e){nt(!1)}function UC(e){let{basename:t="/",children:r=null,location:s,navigationType:a=Rr.Pop,navigator:l,static:u=!1,future:d}=e;Ni()&&nt(!1);let h=t.replace(/^\/*/,"/"),m=x.useMemo(()=>({basename:h,navigator:l,static:u,future:vi({v7_relativeSplatPath:!1},d)}),[h,d,l,u]);typeof s=="string"&&(s=fs(s));let{pathname:g="/",search:y="",hash:C="",state:k=null,key:E="default"}=s,v=x.useMemo(()=>{let S=hf(g,h);return S==null?null:{location:{pathname:S,search:y,hash:C,state:k,key:E},navigationType:a}},[h,g,y,C,k,E,a]);return v==null?null:x.createElement(vo.Provider,{value:m},x.createElement(Tl.Provider,{children:r,value:v}))}function BC(e){let{children:t,location:r}=e;return kC(Nd(t),r)}new Promise(()=>{});function Nd(e,t){t===void 0&&(t=[]);let r=[];return x.Children.forEach(e,(s,a)=>{if(!x.isValidElement(s))return;let l=[...t,a];if(s.type===x.Fragment){r.push.apply(r,Nd(s.props.children,l));return}s.type!==ll&&nt(!1),!s.props.index||!s.props.children||nt(!1);let u={id:s.props.id||l.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,loader:s.props.loader,action:s.props.action,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(u.children=Nd(s.props.children,l)),r.push(u)}),r}/** * React Router DOM v6.30.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Pd(){return Pd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[a]=e[a]);return r}function $C(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function VC(e,t){return e.button===0&&(!t||t==="_self")&&!$C(e)}const HC=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],WC="6";try{window.__reactRouterVersion=WC}catch{}const qC="startTransition",cg=Pl[qC];function KC(e){let{basename:t,children:r,future:s,window:a}=e,l=x.useRef();l.current==null&&(l.current=QE({window:a,v5Compat:!0}));let u=l.current,[d,h]=x.useState({action:u.action,location:u.location}),{v7_startTransition:m}=s||{},g=x.useCallback(y=>{m&&cg?cg(()=>h(y)):h(y)},[h,m]);return x.useLayoutEffect(()=>u.listen(g),[u,g]),x.useEffect(()=>FC(s),[s]),x.createElement(UC,{basename:t,children:r,location:d.location,navigationType:d.action,navigator:u,future:s})}const QC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",YC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,XC=x.forwardRef(function(t,r){let{onClick:s,relative:a,reloadDocument:l,replace:u,state:d,target:h,to:m,preventScrollReset:g,viewTransition:y}=t,C=zC(t,HC),{basename:k}=x.useContext(vo),E,v=!1;if(typeof m=="string"&&YC.test(m)&&(E=m,QC))try{let N=new URL(window.location.href),A=m.startsWith("//")?new URL(N.protocol+m):new URL(m),D=hf(A.pathname,k);A.origin===N.origin&&D!=null?m=D+A.search+A.hash:v=!0}catch{}let S=SC(m,{relative:a}),R=GC(m,{replace:u,state:d,target:h,preventScrollReset:g,relative:a,viewTransition:y});function P(N){s&&s(N),N.defaultPrevented||R(N)}return x.createElement("a",Pd({},C,{href:E||S,onClick:v||l?s:P,ref:r,target:h}))});var ug;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(ug||(ug={}));var dg;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(dg||(dg={}));function GC(e,t){let{target:r,replace:s,state:a,preventScrollReset:l,relative:u,viewTransition:d}=t===void 0?{}:t,h=EC(),m=Pi(),g=Sv(e,{relative:u});return x.useCallback(y=>{if(VC(y,r)){y.preventDefault();let C=s!==void 0?s:bl(m)===bl(g);h(e,{replace:C,state:a,preventScrollReset:l,relative:u,viewTransition:d})}},[m,h,g,s,a,r,e,l,u,d])}function _v(e,t){return function(){return e.apply(t,arguments)}}const{toString:JC}=Object.prototype,{getPrototypeOf:mf}=Object,{iterator:Al,toStringTag:Rv}=Symbol,Ol=(e=>t=>{const r=JC.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),mn=e=>(e=e.toLowerCase(),t=>Ol(t)===e),jl=e=>t=>typeof t===e,{isArray:hs}=Array,us=jl("undefined");function Ti(e){return e!==null&&!us(e)&&e.constructor!==null&&!us(e.constructor)&&It(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Nv=mn("ArrayBuffer");function ZC(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Nv(e.buffer),t}const ek=jl("string"),It=jl("function"),Pv=jl("number"),Ai=e=>e!==null&&typeof e=="object",tk=e=>e===!0||e===!1,cl=e=>{if(Ol(e)!=="object")return!1;const t=mf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Rv in e)&&!(Al in e)},nk=e=>{if(!Ai(e)||Ti(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},rk=mn("Date"),ok=mn("File"),sk=mn("Blob"),ik=mn("FileList"),ak=e=>Ai(e)&&It(e.pipe),lk=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||It(e.append)&&((t=Ol(e))==="formdata"||t==="object"&&It(e.toString)&&e.toString()==="[object FormData]"))},ck=mn("URLSearchParams"),[uk,dk,fk,hk]=["ReadableStream","Request","Response","Headers"].map(mn),pk=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Oi(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let s,a;if(typeof e!="object"&&(e=[e]),hs(e))for(s=0,a=e.length;s0;)if(a=r[s],t===a.toLowerCase())return a;return null}const Jr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Av=e=>!us(e)&&e!==Jr;function Td(){const{caseless:e,skipUndefined:t}=Av(this)&&this||{},r={},s=(a,l)=>{if(l==="__proto__"||l==="constructor"||l==="prototype")return;const u=e&&Tv(r,l)||l;cl(r[u])&&cl(a)?r[u]=Td(r[u],a):cl(a)?r[u]=Td({},a):hs(a)?r[u]=a.slice():(!t||!us(a))&&(r[u]=a)};for(let a=0,l=arguments.length;a(Oi(t,(a,l)=>{r&&It(a)?Object.defineProperty(e,l,{value:_v(a,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,l,{value:a,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:s}),e),gk=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),yk=(e,t,r,s)=>{e.prototype=Object.create(t.prototype,s),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},vk=(e,t,r,s)=>{let a,l,u;const d={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),l=a.length;l-- >0;)u=a[l],(!s||s(u,e,t))&&!d[u]&&(t[u]=e[u],d[u]=!0);e=r!==!1&&mf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},wk=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const s=e.indexOf(t,r);return s!==-1&&s===r},xk=e=>{if(!e)return null;if(hs(e))return e;let t=e.length;if(!Pv(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},bk=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&mf(Uint8Array)),Sk=(e,t)=>{const s=(e&&e[Al]).call(e);let a;for(;(a=s.next())&&!a.done;){const l=a.value;t.call(e,l[0],l[1])}},Ek=(e,t)=>{let r;const s=[];for(;(r=e.exec(t))!==null;)s.push(r);return s},Ck=mn("HTMLFormElement"),kk=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,s,a){return s.toUpperCase()+a}),fg=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),_k=mn("RegExp"),Ov=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),s={};Oi(r,(a,l)=>{let u;(u=t(a,l,e))!==!1&&(s[l]=u||a)}),Object.defineProperties(e,s)},Rk=e=>{Ov(e,(t,r)=>{if(It(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const s=e[r];if(It(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Nk=(e,t)=>{const r={},s=a=>{a.forEach(l=>{r[l]=!0})};return hs(e)?s(e):s(String(e).split(t)),r},Pk=()=>{},Tk=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Ak(e){return!!(e&&It(e.append)&&e[Rv]==="FormData"&&e[Al])}const Ok=e=>{const t=new Array(10),r=(s,a)=>{if(Ai(s)){if(t.indexOf(s)>=0)return;if(Ti(s))return s;if(!("toJSON"in s)){t[a]=s;const l=hs(s)?[]:{};return Oi(s,(u,d)=>{const h=r(u,a+1);!us(h)&&(l[d]=h)}),t[a]=void 0,l}}return s};return r(e,0)},jk=mn("AsyncFunction"),Lk=e=>e&&(Ai(e)||It(e))&&It(e.then)&&It(e.catch),jv=((e,t)=>e?setImmediate:t?((r,s)=>(Jr.addEventListener("message",({source:a,data:l})=>{a===Jr&&l===r&&s.length&&s.shift()()},!1),a=>{s.push(a),Jr.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",It(Jr.postMessage)),Ik=typeof queueMicrotask<"u"?queueMicrotask.bind(Jr):typeof process<"u"&&process.nextTick||jv,Mk=e=>e!=null&&It(e[Al]),B={isArray:hs,isArrayBuffer:Nv,isBuffer:Ti,isFormData:lk,isArrayBufferView:ZC,isString:ek,isNumber:Pv,isBoolean:tk,isObject:Ai,isPlainObject:cl,isEmptyObject:nk,isReadableStream:uk,isRequest:dk,isResponse:fk,isHeaders:hk,isUndefined:us,isDate:rk,isFile:ok,isBlob:sk,isRegExp:_k,isFunction:It,isStream:ak,isURLSearchParams:ck,isTypedArray:bk,isFileList:ik,forEach:Oi,merge:Td,extend:mk,trim:pk,stripBOM:gk,inherits:yk,toFlatObject:vk,kindOf:Ol,kindOfTest:mn,endsWith:wk,toArray:xk,forEachEntry:Sk,matchAll:Ek,isHTMLForm:Ck,hasOwnProperty:fg,hasOwnProp:fg,reduceDescriptors:Ov,freezeMethods:Rk,toObjectSet:Nk,toCamelCase:kk,noop:Pk,toFiniteNumber:Tk,findKey:Tv,global:Jr,isContextDefined:Av,isSpecCompliantForm:Ak,toJSONObject:Ok,isAsyncFn:jk,isThenable:Lk,setImmediate:jv,asap:Ik,isIterable:Mk};let Ce=class Lv extends Error{static from(t,r,s,a,l,u){const d=new Lv(t.message,r||t.code,s,a,l);return d.cause=t,d.name=t.name,u&&Object.assign(d,u),d}constructor(t,r,s,a,l){super(t),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),s&&(this.config=s),a&&(this.request=a),l&&(this.response=l,this.status=l.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:B.toJSONObject(this.config),code:this.code,status:this.status}}};Ce.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Ce.ERR_BAD_OPTION="ERR_BAD_OPTION";Ce.ECONNABORTED="ECONNABORTED";Ce.ETIMEDOUT="ETIMEDOUT";Ce.ERR_NETWORK="ERR_NETWORK";Ce.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Ce.ERR_DEPRECATED="ERR_DEPRECATED";Ce.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Ce.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Ce.ERR_CANCELED="ERR_CANCELED";Ce.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Ce.ERR_INVALID_URL="ERR_INVALID_URL";const Dk=null;function Ad(e){return B.isPlainObject(e)||B.isArray(e)}function Iv(e){return B.endsWith(e,"[]")?e.slice(0,-2):e}function hg(e,t,r){return e?e.concat(t).map(function(a,l){return a=Iv(a),!r&&l?"["+a+"]":a}).join(r?".":""):t}function Fk(e){return B.isArray(e)&&!e.some(Ad)}const Uk=B.toFlatObject(B,{},null,function(t){return/^is[A-Z]/.test(t)});function Ll(e,t,r){if(!B.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=B.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,S){return!B.isUndefined(S[v])});const s=r.metaTokens,a=r.visitor||g,l=r.dots,u=r.indexes,h=(r.Blob||typeof Blob<"u"&&Blob)&&B.isSpecCompliantForm(t);if(!B.isFunction(a))throw new TypeError("visitor must be a function");function m(E){if(E===null)return"";if(B.isDate(E))return E.toISOString();if(B.isBoolean(E))return E.toString();if(!h&&B.isBlob(E))throw new Ce("Blob is not supported. Use a Buffer instead.");return B.isArrayBuffer(E)||B.isTypedArray(E)?h&&typeof Blob=="function"?new Blob([E]):Buffer.from(E):E}function g(E,v,S){let R=E;if(E&&!S&&typeof E=="object"){if(B.endsWith(v,"{}"))v=s?v:v.slice(0,-2),E=JSON.stringify(E);else if(B.isArray(E)&&Fk(E)||(B.isFileList(E)||B.endsWith(v,"[]"))&&(R=B.toArray(E)))return v=Iv(v),R.forEach(function(N,A){!(B.isUndefined(N)||N===null)&&t.append(u===!0?hg([v],A,l):u===null?v:v+"[]",m(N))}),!1}return Ad(E)?!0:(t.append(hg(S,v,l),m(E)),!1)}const y=[],C=Object.assign(Uk,{defaultVisitor:g,convertValue:m,isVisitable:Ad});function k(E,v){if(!B.isUndefined(E)){if(y.indexOf(E)!==-1)throw Error("Circular reference detected in "+v.join("."));y.push(E),B.forEach(E,function(R,P){(!(B.isUndefined(R)||R===null)&&a.call(t,R,B.isString(P)?P.trim():P,v,C))===!0&&k(R,v?v.concat(P):[P])}),y.pop()}}if(!B.isObject(e))throw new TypeError("data must be an object");return k(e),t}function pg(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function gf(e,t){this._pairs=[],e&&Ll(e,this,t)}const Mv=gf.prototype;Mv.append=function(t,r){this._pairs.push([t,r])};Mv.toString=function(t){const r=t?function(s){return t.call(this,s,pg)}:pg;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function Bk(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Dv(e,t,r){if(!t)return e;const s=r&&r.encode||Bk,a=B.isFunction(r)?{serialize:r}:r,l=a&&a.serialize;let u;if(l?u=l(t,a):u=B.isURLSearchParams(t)?t.toString():new gf(t,a).toString(s),u){const d=e.indexOf("#");d!==-1&&(e=e.slice(0,d)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class mg{constructor(){this.handlers=[]}use(t,r,s){return this.handlers.push({fulfilled:t,rejected:r,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){B.forEach(this.handlers,function(s){s!==null&&t(s)})}}const yf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},zk=typeof URLSearchParams<"u"?URLSearchParams:gf,$k=typeof FormData<"u"?FormData:null,Vk=typeof Blob<"u"?Blob:null,Hk={isBrowser:!0,classes:{URLSearchParams:zk,FormData:$k,Blob:Vk},protocols:["http","https","file","blob","url","data"]},vf=typeof window<"u"&&typeof document<"u",Od=typeof navigator=="object"&&navigator||void 0,Wk=vf&&(!Od||["ReactNative","NativeScript","NS"].indexOf(Od.product)<0),qk=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Kk=vf&&window.location.href||"http://localhost",Qk=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:vf,hasStandardBrowserEnv:Wk,hasStandardBrowserWebWorkerEnv:qk,navigator:Od,origin:Kk},Symbol.toStringTag,{value:"Module"})),St={...Qk,...Hk};function Yk(e,t){return Ll(e,new St.classes.URLSearchParams,{visitor:function(r,s,a,l){return St.isNode&&B.isBuffer(r)?(this.append(s,r.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)},...t})}function Xk(e){return B.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Gk(e){const t={},r=Object.keys(e);let s;const a=r.length;let l;for(s=0;s=r.length;return u=!u&&B.isArray(a)?a.length:u,h?(B.hasOwnProp(a,u)?a[u]=[a[u],s]:a[u]=s,!d):((!a[u]||!B.isObject(a[u]))&&(a[u]=[]),t(r,s,a[u],l)&&B.isArray(a[u])&&(a[u]=Gk(a[u])),!d)}if(B.isFormData(e)&&B.isFunction(e.entries)){const r={};return B.forEachEntry(e,(s,a)=>{t(Xk(s),a,r,0)}),r}return null}function Jk(e,t,r){if(B.isString(e))try{return(t||JSON.parse)(e),B.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(r||JSON.stringify)(e)}const ji={transitional:yf,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const s=r.getContentType()||"",a=s.indexOf("application/json")>-1,l=B.isObject(t);if(l&&B.isHTMLForm(t)&&(t=new FormData(t)),B.isFormData(t))return a?JSON.stringify(Fv(t)):t;if(B.isArrayBuffer(t)||B.isBuffer(t)||B.isStream(t)||B.isFile(t)||B.isBlob(t)||B.isReadableStream(t))return t;if(B.isArrayBufferView(t))return t.buffer;if(B.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let d;if(l){if(s.indexOf("application/x-www-form-urlencoded")>-1)return Yk(t,this.formSerializer).toString();if((d=B.isFileList(t))||s.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return Ll(d?{"files[]":t}:t,h&&new h,this.formSerializer)}}return l||a?(r.setContentType("application/json",!1),Jk(t)):t}],transformResponse:[function(t){const r=this.transitional||ji.transitional,s=r&&r.forcedJSONParsing,a=this.responseType==="json";if(B.isResponse(t)||B.isReadableStream(t))return t;if(t&&B.isString(t)&&(s&&!this.responseType||a)){const u=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(t,this.parseReviver)}catch(d){if(u)throw d.name==="SyntaxError"?Ce.from(d,Ce.ERR_BAD_RESPONSE,this,null,this.response):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:St.classes.FormData,Blob:St.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};B.forEach(["delete","get","head","post","put","patch"],e=>{ji.headers[e]={}});const Zk=B.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),e_=e=>{const t={};let r,s,a;return e&&e.split(` `).forEach(function(u){a=u.indexOf(":"),r=u.substring(0,a).trim().toLowerCase(),s=u.substring(a+1).trim(),!(!r||t[r]&&Zk[r])&&(r==="set-cookie"?t[r]?t[r].push(s):t[r]=[s]:t[r]=t[r]?t[r]+", "+s:s)}),t},gg=Symbol("internals");function si(e){return e&&String(e).trim().toLowerCase()}function ul(e){return e===!1||e==null?e:B.isArray(e)?e.map(ul):String(e)}function t_(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=r.exec(e);)t[s[1]]=s[2];return t}const n_=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Qu(e,t,r,s,a){if(B.isFunction(s))return s.call(this,t,r);if(a&&(t=r),!!B.isString(t)){if(B.isString(s))return t.indexOf(s)!==-1;if(B.isRegExp(s))return s.test(t)}}function r_(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,s)=>r.toUpperCase()+s)}function o_(e,t){const r=B.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+r,{value:function(a,l,u){return this[s].call(this,t,a,l,u)},configurable:!0})})}let Mt=class{constructor(t){t&&this.set(t)}set(t,r,s){const a=this;function l(d,h,m){const g=si(h);if(!g)throw new Error("header name must be a non-empty string");const y=B.findKey(a,g);(!y||a[y]===void 0||m===!0||m===void 0&&a[y]!==!1)&&(a[y||h]=ul(d))}const u=(d,h)=>B.forEach(d,(m,g)=>l(m,g,h));if(B.isPlainObject(t)||t instanceof this.constructor)u(t,r);else if(B.isString(t)&&(t=t.trim())&&!n_(t))u(e_(t),r);else if(B.isObject(t)&&B.isIterable(t)){let d={},h,m;for(const g of t){if(!B.isArray(g))throw TypeError("Object iterator must return a key-value pair");d[m=g[0]]=(h=d[m])?B.isArray(h)?[...h,g[1]]:[h,g[1]]:g[1]}u(d,r)}else t!=null&&l(r,t,s);return this}get(t,r){if(t=si(t),t){const s=B.findKey(this,t);if(s){const a=this[s];if(!r)return a;if(r===!0)return t_(a);if(B.isFunction(r))return r.call(this,a,s);if(B.isRegExp(r))return r.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=si(t),t){const s=B.findKey(this,t);return!!(s&&this[s]!==void 0&&(!r||Qu(this,this[s],s,r)))}return!1}delete(t,r){const s=this;let a=!1;function l(u){if(u=si(u),u){const d=B.findKey(s,u);d&&(!r||Qu(s,s[d],d,r))&&(delete s[d],a=!0)}}return B.isArray(t)?t.forEach(l):l(t),a}clear(t){const r=Object.keys(this);let s=r.length,a=!1;for(;s--;){const l=r[s];(!t||Qu(this,this[l],l,t,!0))&&(delete this[l],a=!0)}return a}normalize(t){const r=this,s={};return B.forEach(this,(a,l)=>{const u=B.findKey(s,l);if(u){r[u]=ul(a),delete r[l];return}const d=t?r_(l):String(l).trim();d!==l&&delete r[l],r[d]=ul(a),s[d]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return B.forEach(this,(s,a)=>{s!=null&&s!==!1&&(r[a]=t&&B.isArray(s)?s.join(", "):s)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const s=new this(t);return r.forEach(a=>s.set(a)),s}static accessor(t){const s=(this[gg]=this[gg]={accessors:{}}).accessors,a=this.prototype;function l(u){const d=si(u);s[d]||(o_(a,u),s[d]=!0)}return B.isArray(t)?t.forEach(l):l(t),this}};Mt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);B.reduceDescriptors(Mt.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[r]=s}}});B.freezeMethods(Mt);function Yu(e,t){const r=this||ji,s=t||r,a=Mt.from(s.headers);let l=s.data;return B.forEach(e,function(d){l=d.call(r,l,a.normalize(),t?t.status:void 0)}),a.normalize(),l}function Uv(e){return!!(e&&e.__CANCEL__)}let Li=class extends Ce{constructor(t,r,s){super(t??"canceled",Ce.ERR_CANCELED,r,s),this.name="CanceledError",this.__CANCEL__=!0}};function Bv(e,t,r){const s=r.config.validateStatus;!r.status||!s||s(r.status)?e(r):t(new Ce("Request failed with status code "+r.status,[Ce.ERR_BAD_REQUEST,Ce.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function s_(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function i_(e,t){e=e||10;const r=new Array(e),s=new Array(e);let a=0,l=0,u;return t=t!==void 0?t:1e3,function(h){const m=Date.now(),g=s[l];u||(u=m),r[a]=h,s[a]=m;let y=l,C=0;for(;y!==a;)C+=r[y++],y=y%e;if(a=(a+1)%e,a===l&&(l=(l+1)%e),m-u{r=g,a=null,l&&(clearTimeout(l),l=null),e(...m)};return[(...m)=>{const g=Date.now(),y=g-r;y>=s?u(m,g):(a=m,l||(l=setTimeout(()=>{l=null,u(a)},s-y)))},()=>a&&u(a)]}const Sl=(e,t,r=3)=>{let s=0;const a=i_(50,250);return a_(l=>{const u=l.loaded,d=l.lengthComputable?l.total:void 0,h=u-s,m=a(h),g=u<=d;s=u;const y={loaded:u,total:d,progress:d?u/d:void 0,bytes:h,rate:m||void 0,estimated:m&&d&&g?(d-u)/m:void 0,event:l,lengthComputable:d!=null,[t?"download":"upload"]:!0};e(y)},r)},yg=(e,t)=>{const r=e!=null;return[s=>t[0]({lengthComputable:r,total:e,loaded:s}),t[1]]},vg=e=>(...t)=>B.asap(()=>e(...t)),l_=St.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,St.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(St.origin),St.navigator&&/(msie|trident)/i.test(St.navigator.userAgent)):()=>!0,c_=St.hasStandardBrowserEnv?{write(e,t,r,s,a,l,u){if(typeof document>"u")return;const d=[`${e}=${encodeURIComponent(t)}`];B.isNumber(r)&&d.push(`expires=${new Date(r).toUTCString()}`),B.isString(s)&&d.push(`path=${s}`),B.isString(a)&&d.push(`domain=${a}`),l===!0&&d.push("secure"),B.isString(u)&&d.push(`SameSite=${u}`),document.cookie=d.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function u_(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function d_(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function zv(e,t,r){let s=!u_(t);return e&&(s||r==!1)?d_(e,t):t}const wg=e=>e instanceof Mt?{...e}:e;function fo(e,t){t=t||{};const r={};function s(m,g,y,C){return B.isPlainObject(m)&&B.isPlainObject(g)?B.merge.call({caseless:C},m,g):B.isPlainObject(g)?B.merge({},g):B.isArray(g)?g.slice():g}function a(m,g,y,C){if(B.isUndefined(g)){if(!B.isUndefined(m))return s(void 0,m,y,C)}else return s(m,g,y,C)}function l(m,g){if(!B.isUndefined(g))return s(void 0,g)}function u(m,g){if(B.isUndefined(g)){if(!B.isUndefined(m))return s(void 0,m)}else return s(void 0,g)}function d(m,g,y){if(y in t)return s(m,g);if(y in e)return s(void 0,m)}const h={url:l,method:l,data:l,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:d,headers:(m,g,y)=>a(wg(m),wg(g),y,!0)};return B.forEach(Object.keys({...e,...t}),function(g){if(g==="__proto__"||g==="constructor"||g==="prototype")return;const y=B.hasOwnProp(h,g)?h[g]:a,C=y(e[g],t[g],g);B.isUndefined(C)&&y!==d||(r[g]=C)}),r}const $v=e=>{const t=fo({},e);let{data:r,withXSRFToken:s,xsrfHeaderName:a,xsrfCookieName:l,headers:u,auth:d}=t;if(t.headers=u=Mt.from(u),t.url=Dv(zv(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),d&&u.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?unescape(encodeURIComponent(d.password)):""))),B.isFormData(r)){if(St.hasStandardBrowserEnv||St.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(B.isFunction(r.getHeaders)){const h=r.getHeaders(),m=["content-type","content-length"];Object.entries(h).forEach(([g,y])=>{m.includes(g.toLowerCase())&&u.set(g,y)})}}if(St.hasStandardBrowserEnv&&(s&&B.isFunction(s)&&(s=s(t)),s||s!==!1&&l_(t.url))){const h=a&&l&&c_.read(l);h&&u.set(a,h)}return t},f_=typeof XMLHttpRequest<"u",h_=f_&&function(e){return new Promise(function(r,s){const a=$v(e);let l=a.data;const u=Mt.from(a.headers).normalize();let{responseType:d,onUploadProgress:h,onDownloadProgress:m}=a,g,y,C,k,E;function v(){k&&k(),E&&E(),a.cancelToken&&a.cancelToken.unsubscribe(g),a.signal&&a.signal.removeEventListener("abort",g)}let S=new XMLHttpRequest;S.open(a.method.toUpperCase(),a.url,!0),S.timeout=a.timeout;function R(){if(!S)return;const N=Mt.from("getAllResponseHeaders"in S&&S.getAllResponseHeaders()),D={data:!d||d==="text"||d==="json"?S.responseText:S.response,status:S.status,statusText:S.statusText,headers:N,config:e,request:S};Bv(function(H){r(H),v()},function(H){s(H),v()},D),S=null}"onloadend"in S?S.onloadend=R:S.onreadystatechange=function(){!S||S.readyState!==4||S.status===0&&!(S.responseURL&&S.responseURL.indexOf("file:")===0)||setTimeout(R)},S.onabort=function(){S&&(s(new Ce("Request aborted",Ce.ECONNABORTED,e,S)),S=null)},S.onerror=function(A){const D=A&&A.message?A.message:"Network Error",V=new Ce(D,Ce.ERR_NETWORK,e,S);V.event=A||null,s(V),S=null},S.ontimeout=function(){let A=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const D=a.transitional||yf;a.timeoutErrorMessage&&(A=a.timeoutErrorMessage),s(new Ce(A,D.clarifyTimeoutError?Ce.ETIMEDOUT:Ce.ECONNABORTED,e,S)),S=null},l===void 0&&u.setContentType(null),"setRequestHeader"in S&&B.forEach(u.toJSON(),function(A,D){S.setRequestHeader(D,A)}),B.isUndefined(a.withCredentials)||(S.withCredentials=!!a.withCredentials),d&&d!=="json"&&(S.responseType=a.responseType),m&&([C,E]=Sl(m,!0),S.addEventListener("progress",C)),h&&S.upload&&([y,k]=Sl(h),S.upload.addEventListener("progress",y),S.upload.addEventListener("loadend",k)),(a.cancelToken||a.signal)&&(g=N=>{S&&(s(!N||N.type?new Li(null,e,S):N),S.abort(),S=null)},a.cancelToken&&a.cancelToken.subscribe(g),a.signal&&(a.signal.aborted?g():a.signal.addEventListener("abort",g)));const P=s_(a.url);if(P&&St.protocols.indexOf(P)===-1){s(new Ce("Unsupported protocol "+P+":",Ce.ERR_BAD_REQUEST,e));return}S.send(l||null)})},p_=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let s=new AbortController,a;const l=function(m){if(!a){a=!0,d();const g=m instanceof Error?m:this.reason;s.abort(g instanceof Ce?g:new Li(g instanceof Error?g.message:g))}};let u=t&&setTimeout(()=>{u=null,l(new Ce(`timeout of ${t}ms exceeded`,Ce.ETIMEDOUT))},t);const d=()=>{e&&(u&&clearTimeout(u),u=null,e.forEach(m=>{m.unsubscribe?m.unsubscribe(l):m.removeEventListener("abort",l)}),e=null)};e.forEach(m=>m.addEventListener("abort",l));const{signal:h}=s;return h.unsubscribe=()=>B.asap(d),h}},m_=function*(e,t){let r=e.byteLength;if(r{const a=g_(e,t);let l=0,u,d=h=>{u||(u=!0,s&&s(h))};return new ReadableStream({async pull(h){try{const{done:m,value:g}=await a.next();if(m){d(),h.close();return}let y=g.byteLength;if(r){let C=l+=y;r(C)}h.enqueue(new Uint8Array(g))}catch(m){throw d(m),m}},cancel(h){return d(h),a.return()}},{highWaterMark:2})},bg=64*1024,{isFunction:Ga}=B,v_=(({Request:e,Response:t})=>({Request:e,Response:t}))(B.global),{ReadableStream:Sg,TextEncoder:Eg}=B.global,Cg=(e,...t)=>{try{return!!e(...t)}catch{return!1}},w_=e=>{e=B.merge.call({skipUndefined:!0},v_,e);const{fetch:t,Request:r,Response:s}=e,a=t?Ga(t):typeof fetch=="function",l=Ga(r),u=Ga(s);if(!a)return!1;const d=a&&Ga(Sg),h=a&&(typeof Eg=="function"?(E=>v=>E.encode(v))(new Eg):async E=>new Uint8Array(await new r(E).arrayBuffer())),m=l&&d&&Cg(()=>{let E=!1;const v=new r(St.origin,{body:new Sg,method:"POST",get duplex(){return E=!0,"half"}}).headers.has("Content-Type");return E&&!v}),g=u&&d&&Cg(()=>B.isReadableStream(new s("").body)),y={stream:g&&(E=>E.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(E=>{!y[E]&&(y[E]=(v,S)=>{let R=v&&v[E];if(R)return R.call(v);throw new Ce(`Response type '${E}' is not supported`,Ce.ERR_NOT_SUPPORT,S)})});const C=async E=>{if(E==null)return 0;if(B.isBlob(E))return E.size;if(B.isSpecCompliantForm(E))return(await new r(St.origin,{method:"POST",body:E}).arrayBuffer()).byteLength;if(B.isArrayBufferView(E)||B.isArrayBuffer(E))return E.byteLength;if(B.isURLSearchParams(E)&&(E=E+""),B.isString(E))return(await h(E)).byteLength},k=async(E,v)=>{const S=B.toFiniteNumber(E.getContentLength());return S??C(v)};return async E=>{let{url:v,method:S,data:R,signal:P,cancelToken:N,timeout:A,onDownloadProgress:D,onUploadProgress:V,responseType:H,headers:U,withCredentials:X="same-origin",fetchOptions:re}=$v(E),ee=t||fetch;H=H?(H+"").toLowerCase():"text";let he=p_([P,N&&N.toAbortSignal()],A),ve=null;const ue=he&&he.unsubscribe&&(()=>{he.unsubscribe()});let Ee;try{if(V&&m&&S!=="get"&&S!=="head"&&(Ee=await k(U,R))!==0){let L=new r(v,{method:"POST",body:R,duplex:"half"}),W;if(B.isFormData(R)&&(W=L.headers.get("content-type"))&&U.setContentType(W),L.body){const[we,ye]=yg(Ee,Sl(vg(V)));R=xg(L.body,bg,we,ye)}}B.isString(X)||(X=X?"include":"omit");const J=l&&"credentials"in r.prototype,se={...re,signal:he,method:S.toUpperCase(),headers:U.normalize().toJSON(),body:R,duplex:"half",credentials:J?X:void 0};ve=l&&new r(v,se);let $=await(l?ee(ve,re):ee(v,se));const G=g&&(H==="stream"||H==="response");if(g&&(D||G&&ue)){const L={};["status","statusText","headers"].forEach(pe=>{L[pe]=$[pe]});const W=B.toFiniteNumber($.headers.get("content-length")),[we,ye]=D&&yg(W,Sl(vg(D),!0))||[];$=new s(xg($.body,bg,we,()=>{ye&&ye(),ue&&ue()}),L)}H=H||"text";let z=await y[B.findKey(y,H)||"text"]($,E);return!G&&ue&&ue(),await new Promise((L,W)=>{Bv(L,W,{data:z,headers:Mt.from($.headers),status:$.status,statusText:$.statusText,config:E,request:ve})})}catch(J){throw ue&&ue(),J&&J.name==="TypeError"&&/Load failed|fetch/i.test(J.message)?Object.assign(new Ce("Network Error",Ce.ERR_NETWORK,E,ve,J&&J.response),{cause:J.cause||J}):Ce.from(J,J&&J.code,E,ve,J&&J.response)}}},x_=new Map,Vv=e=>{let t=e&&e.env||{};const{fetch:r,Request:s,Response:a}=t,l=[s,a,r];let u=l.length,d=u,h,m,g=x_;for(;d--;)h=l[d],m=g.get(h),m===void 0&&g.set(h,m=d?new Map:w_(t)),g=m;return m};Vv();const wf={http:Dk,xhr:h_,fetch:{get:Vv}};B.forEach(wf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const kg=e=>`- ${e}`,b_=e=>B.isFunction(e)||e===null||e===!1;function S_(e,t){e=B.isArray(e)?e:[e];const{length:r}=e;let s,a;const l={};for(let u=0;u`adapter ${h} `+(m===!1?"is not supported by the environment":"is not available in the build"));let d=r?u.length>1?`since : `+u.map(kg).join(` `):" "+kg(u[0]):"as no adapter specified";throw new Ce("There is no suitable adapter to dispatch the request "+d,"ERR_NOT_SUPPORT")}return a}const Hv={getAdapter:S_,adapters:wf};function Xu(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Li(null,e)}function _g(e){return Xu(e),e.headers=Mt.from(e.headers),e.data=Yu.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Hv.getAdapter(e.adapter||ji.adapter,e)(e).then(function(s){return Xu(e),s.data=Yu.call(e,e.transformResponse,s),s.headers=Mt.from(s.headers),s},function(s){return Uv(s)||(Xu(e),s&&s.response&&(s.response.data=Yu.call(e,e.transformResponse,s.response),s.response.headers=Mt.from(s.response.headers))),Promise.reject(s)})}const Wv="1.13.5",Il={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Il[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const Rg={};Il.transitional=function(t,r,s){function a(l,u){return"[Axios v"+Wv+"] Transitional option '"+l+"'"+u+(s?". "+s:"")}return(l,u,d)=>{if(t===!1)throw new Ce(a(u," has been removed"+(r?" in "+r:"")),Ce.ERR_DEPRECATED);return r&&!Rg[u]&&(Rg[u]=!0,console.warn(a(u," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(l,u,d):!0}};Il.spelling=function(t){return(r,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function E_(e,t,r){if(typeof e!="object")throw new Ce("options must be an object",Ce.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let a=s.length;for(;a-- >0;){const l=s[a],u=t[l];if(u){const d=e[l],h=d===void 0||u(d,l,e);if(h!==!0)throw new Ce("option "+l+" must be "+h,Ce.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Ce("Unknown option "+l,Ce.ERR_BAD_OPTION)}}const dl={assertOptions:E_,validators:Il},Xt=dl.validators;let co=class{constructor(t){this.defaults=t||{},this.interceptors={request:new mg,response:new mg}}async request(t,r){try{return await this._request(t,r)}catch(s){if(s instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const l=a.stack?a.stack.replace(/^.+\n/,""):"";try{s.stack?l&&!String(s.stack).endsWith(l.replace(/^.+\n.+\n/,""))&&(s.stack+=` `+l):s.stack=l}catch{}}throw s}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=fo(this.defaults,r);const{transitional:s,paramsSerializer:a,headers:l}=r;s!==void 0&&dl.assertOptions(s,{silentJSONParsing:Xt.transitional(Xt.boolean),forcedJSONParsing:Xt.transitional(Xt.boolean),clarifyTimeoutError:Xt.transitional(Xt.boolean),legacyInterceptorReqResOrdering:Xt.transitional(Xt.boolean)},!1),a!=null&&(B.isFunction(a)?r.paramsSerializer={serialize:a}:dl.assertOptions(a,{encode:Xt.function,serialize:Xt.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),dl.assertOptions(r,{baseUrl:Xt.spelling("baseURL"),withXsrfToken:Xt.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let u=l&&B.merge(l.common,l[r.method]);l&&B.forEach(["delete","get","head","post","put","patch","common"],E=>{delete l[E]}),r.headers=Mt.concat(u,l);const d=[];let h=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(r)===!1)return;h=h&&v.synchronous;const S=r.transitional||yf;S&&S.legacyInterceptorReqResOrdering?d.unshift(v.fulfilled,v.rejected):d.push(v.fulfilled,v.rejected)});const m=[];this.interceptors.response.forEach(function(v){m.push(v.fulfilled,v.rejected)});let g,y=0,C;if(!h){const E=[_g.bind(this),void 0];for(E.unshift(...d),E.push(...m),C=E.length,g=Promise.resolve(r);y{if(!s._listeners)return;let l=s._listeners.length;for(;l-- >0;)s._listeners[l](a);s._listeners=null}),this.promise.then=a=>{let l;const u=new Promise(d=>{s.subscribe(d),l=d}).then(a);return u.cancel=function(){s.unsubscribe(l)},u},t(function(l,u,d){s.reason||(s.reason=new Li(l,u,d),r(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=s=>{t.abort(s)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new qv(function(a){t=a}),cancel:t}}};function k_(e){return function(r){return e.apply(null,r)}}function __(e){return B.isObject(e)&&e.isAxiosError===!0}const jd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(jd).forEach(([e,t])=>{jd[t]=e});function Kv(e){const t=new co(e),r=_v(co.prototype.request,t);return B.extend(r,co.prototype,t,{allOwnKeys:!0}),B.extend(r,t,null,{allOwnKeys:!0}),r.create=function(a){return Kv(fo(e,a))},r}const Ze=Kv(ji);Ze.Axios=co;Ze.CanceledError=Li;Ze.CancelToken=C_;Ze.isCancel=Uv;Ze.VERSION=Wv;Ze.toFormData=Ll;Ze.AxiosError=Ce;Ze.Cancel=Ze.CanceledError;Ze.all=function(t){return Promise.all(t)};Ze.spread=k_;Ze.isAxiosError=__;Ze.mergeConfig=fo;Ze.AxiosHeaders=Mt;Ze.formToJSON=e=>Fv(B.isHTMLForm(e)?new FormData(e):e);Ze.getAdapter=Hv.getAdapter;Ze.HttpStatusCode=jd;Ze.default=Ze;const{Axios:qA,AxiosError:KA,CanceledError:QA,isCancel:YA,CancelToken:XA,VERSION:GA,all:JA,Cancel:ZA,isAxiosError:eO,spread:tO,toFormData:nO,AxiosHeaders:rO,HttpStatusCode:oO,formToJSON:sO,getAdapter:iO,mergeConfig:aO}=Ze,R_=typeof window>"u",Ng=!R_&&window.self!==window.top,Gu=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),mt=[];for(let e=0;e<256;++e)mt.push((e+256).toString(16).slice(1));function N_(e,t=0){return(mt[e[t+0]]+mt[e[t+1]]+mt[e[t+2]]+mt[e[t+3]]+"-"+mt[e[t+4]]+mt[e[t+5]]+"-"+mt[e[t+6]]+mt[e[t+7]]+"-"+mt[e[t+8]]+mt[e[t+9]]+"-"+mt[e[t+10]]+mt[e[t+11]]+mt[e[t+12]]+mt[e[t+13]]+mt[e[t+14]]+mt[e[t+15]]).toLowerCase()}let Ju;const P_=new Uint8Array(16);function T_(){if(!Ju){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Ju=crypto.getRandomValues.bind(crypto)}return Ju(P_)}const A_=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Pg={randomUUID:A_};function O_(e,t,r){var a;e=e||{};const s=e.random??((a=e.rng)==null?void 0:a.call(e))??T_();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,N_(s)}function j_(e,t,r){return Pg.randomUUID&&!e?Pg.randomUUID():O_(e)}class L_ extends Error{constructor(t,r,s,a,l){super(t),this.name="Base44Error",this.status=r,this.code=s,this.data=a,this.originalError=l}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function ci({baseURL:e,headers:t={},token:r,interceptResponses:s=!0,onError:a}){const l=Ze.create({baseURL:e,headers:{"Content-Type":"application/json",Accept:"application/json",...t}});return r&&(l.defaults.headers.common.Authorization=`Bearer ${r}`),l.interceptors.request.use(u=>{typeof window<"u"&&u.headers.set("X-Origin-URL",window.location.href);const d=j_();if(u.requestId=d,Ng)try{window.parent.postMessage({type:"api-request-start",requestId:d,data:{url:e+u.url,method:u.method,body:u.data instanceof FormData?"[FormData object]":u.data}},"*")}catch{}return u}),s&&l.interceptors.response.use(u=>{var d;const h=(d=u.config)===null||d===void 0?void 0:d.requestId;try{Ng&&h&&window.parent.postMessage({type:"api-request-end",requestId:h,data:{statusCode:u.status,response:u.data}},"*")}catch{}return u.data},u=>{var d,h,m,g,y,C,k,E;const v=((h=(d=u.response)===null||d===void 0?void 0:d.data)===null||h===void 0?void 0:h.message)||((g=(m=u.response)===null||m===void 0?void 0:m.data)===null||g===void 0?void 0:g.detail)||u.message,S=new L_(v,(y=u.response)===null||y===void 0?void 0:y.status,(k=(C=u.response)===null||C===void 0?void 0:C.data)===null||k===void 0?void 0:k.code,(E=u.response)===null||E===void 0?void 0:E.data,u);return a==null||a(S),Promise.reject(S)}),l}function Tg(e){const{axios:t,appId:r,getSocket:s}=e;return new Proxy({},{get(a,l){if(!(typeof l!="string"||l==="then"||l.startsWith("_")))return M_(t,r,l,s)}})}function I_(e){var t;try{const r=JSON.parse(e);return{type:r.type,data:r.data,id:r.id||((t=r.data)===null||t===void 0?void 0:t.id),timestamp:r.timestamp||new Date().toISOString()}}catch(r){return console.warn("[Base44 SDK] Failed to parse realtime message:",r),null}}function M_(e,t,r,s){const a=`/apps/${t}/entities/${r}`;return{async list(l,u,d,h){const m={};return l&&(m.sort=l),u&&(m.limit=u),d&&(m.skip=d),h&&(m.fields=Array.isArray(h)?h.join(","):h),e.get(a,{params:m})},async filter(l,u,d,h,m){const g={q:JSON.stringify(l)};return u&&(g.sort=u),d&&(g.limit=d),h&&(g.skip=h),m&&(g.fields=Array.isArray(m)?m.join(","):m),e.get(a,{params:g})},async get(l){return e.get(`${a}/${l}`)},async create(l){return e.post(a,l)},async update(l,u){return e.put(`${a}/${l}`,u)},async delete(l){return e.delete(`${a}/${l}`)},async deleteMany(l){return e.delete(a,{data:l})},async bulkCreate(l){return e.post(`${a}/bulk`,l)},async updateMany(l,u){return e.patch(`${a}/update-many`,{query:l,data:u})},async bulkUpdate(l){return e.put(`${a}/bulk`,l)},async importEntities(l){const u=new FormData;return u.append("file",l,l.name),e.post(`${a}/import`,u,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(l){const u=`entities:${t}:${r}`;return s().subscribeToRoom(u,{update_model:m=>{const g=I_(m.data);if(g)try{l(g)}catch(y){console.error("[Base44 SDK] Subscription callback error:",y)}}})}}}function D_(e,t){return{async call(r,s,a){if(!(r!=null&&r.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(s!=null&&s.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:l,queryParams:u,...d}=a??{},h={...d,...l&&{path_params:l},...u&&{query_params:u}};return await e.post(`/apps/${t}/integrations/custom/${r}/${s}`,h)}}}function Ag(e,t){const r=D_(e,t);return new Proxy({},{get(s,a){if(!(typeof a!="string"||a==="then"||a.startsWith("_")))return a==="custom"?r:new Proxy({},{get(l,u){if(!(typeof u!="string"||u==="then"||u.startsWith("_")))return async d=>{if(typeof d=="string")throw new Error(`Integration ${u} must receive an object with named parameters, received: ${d}`);let h,m;return d instanceof FormData||d&&Object.values(d).some(g=>g instanceof File)?(h=new FormData,Object.keys(d).forEach(g=>{d[g]instanceof File?h.append(g,d[g],d[g].name):typeof d[g]=="object"&&d[g]!==null?h.append(g,JSON.stringify(d[g])):h.append(g,d[g])}),m="multipart/form-data"):(h=d,m="application/json"),a==="Core"?e.post(`/apps/${t}/integration-endpoints/Core/${u}`,h||d,{headers:{"Content-Type":m}}):e.post(`/apps/${t}/integration-endpoints/installable/${a}/integration-endpoints/${u}`,h||d,{headers:{"Content-Type":m}})}}})}})}function F_(){return typeof window>"u"?!1:window!==window.parent}function U_(e,t,r){const l=Math.round(window.screenX+(window.outerWidth-500)/2),u=Math.round(window.screenY+(window.outerHeight-600)/2),d=window.open(e,"base44_auth",`width=500,height=600,left=${l},top=${u},resizable=yes,scrollbars=yes`);if(!d)return;const h=()=>{window.removeEventListener("message",m),clearInterval(g),d.closed||d.close()},m=y=>{var C;if(y.origin!==r||y.source!==d||!(!((C=y.data)===null||C===void 0)&&C.access_token))return;h();const k=new URL(t),{access_token:E,is_new_user:v}=y.data;k.searchParams.set("access_token",E),v!=null&&k.searchParams.set("is_new_user",String(v)),window.location.href=k.toString()},g=setInterval(()=>{d.closed&&h()},500);window.addEventListener("message",m)}function B_(e,t,r,s){return{async me(){return e.get(`/apps/${r}/entities/User/me`)},async updateMe(a){return e.put(`/apps/${r}/entities/User/me`,a)},redirectToLogin(a){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const l=a?new URL(a,window.location.origin).toString():window.location.href,u=`${s.appBaseUrl}/login?from_url=${encodeURIComponent(l)}`;window.location.href=u},loginWithProvider(a,l="/"){const u=new URL(l,window.location.origin).toString(),d=`app_id=${r}&from_url=${encodeURIComponent(u)}`;let h;a==="sso"?h=`/apps/${r}/auth/sso/login`:h=`/apps/auth${a==="google"?"":`/${a}`}/login`;const m=`${s.appBaseUrl}/api${h}?${d}`;if(F_()){const g=`${m}&popup_origin=${encodeURIComponent(window.location.origin)}`;return U_(g,u,window.location.origin)}window.location.href=m},logout(a){if(delete e.defaults.headers.common.Authorization,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(d){console.error("Failed to remove token from localStorage:",d)}const l=a||window.location.href,u=`${s.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(l)}`;window.location.href=u}},setToken(a,l=!0){if(a&&(e.defaults.headers.common.Authorization=`Bearer ${a}`,t.defaults.headers.common.Authorization=`Bearer ${a}`,l&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",a),window.localStorage.setItem("token",a)}catch(u){console.error("Failed to save token to localStorage:",u)}},async loginViaEmailPassword(a,l,u){var d;try{const h=await e.post(`/apps/${r}/auth/login`,{email:a,password:l,...u&&{turnstile_token:u}}),{access_token:m,user:g}=h;return m&&this.setToken(m),{access_token:m,user:g}}catch(h){throw((d=h.response)===null||d===void 0?void 0:d.status)===401&&await this.logout(),h}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(a,l){return e.post(`/apps/${r}/users/invite-user`,{user_email:a,role:l})},register(a){return e.post(`/apps/${r}/auth/register`,a)},verifyOtp({email:a,otpCode:l}){return e.post(`/apps/${r}/auth/verify-otp`,{email:a,otp_code:l})},resendOtp(a){return e.post(`/apps/${r}/auth/resend-otp`,{email:a})},resetPasswordRequest(a){return e.post(`/apps/${r}/auth/reset-password-request`,{email:a})},resetPassword({resetToken:a,newPassword:l}){return e.post(`/apps/${r}/auth/reset-password`,{reset_token:a,new_password:l})},changePassword({userId:a,currentPassword:l,newPassword:u}){return e.post(`/apps/${r}/auth/change-password`,{user_id:a,current_password:l,new_password:u})}}}function z_(e,t){return{async getAccessToken(r){const s=`/apps/${t}/auth/sso/accesstoken/${r}`;return e.get(s)}}}function $_(e,t){return{async getAccessToken(r){if(!r||typeof r!="string")throw new Error("Integration type is required and must be a string");return(await e.get(`/apps/${t}/external-auth/tokens/${r}`)).access_token},async getConnection(r){var s;if(!r||typeof r!="string")throw new Error("Integration type is required and must be a string");const l=await e.get(`/apps/${t}/external-auth/tokens/${r}`);return{accessToken:l.access_token,connectionConfig:(s=l.connection_config)!==null&&s!==void 0?s:null}},async getCurrentAppUserAccessToken(r){if(!r||typeof r!="string")throw new Error("Connector ID is required and must be a string");return(await e.get(`/apps/${t}/app-user-auth/connectors/${r}/token`)).access_token},async getCurrentAppUserConnection(r){var s;if(!r||typeof r!="string")throw new Error("Connector ID is required and must be a string");const l=await e.get(`/apps/${t}/app-user-auth/connectors/${r}/token`);return{accessToken:l.access_token,connectionConfig:(s=l.connection_config)!==null&&s!==void 0?s:null}}}}function V_(e,t){return{async connectAppUser(r){if(!r||typeof r!="string")throw new Error("Connector ID is required and must be a string");return(await e.post(`/apps/${t}/app-user-auth/connectors/${r}/initiate`)).redirect_url},async disconnectAppUser(r){if(!r||typeof r!="string")throw new Error("Connector ID is required and must be a string");await e.delete(`/apps/${t}/app-user-auth/connectors/${r}`)}}}function wi(e={}){const{storageKey:t="base44_access_token",paramName:r="access_token",saveToStorage:s=!0,removeFromUrl:a=!0}=e;let l=null;if(typeof window<"u"&&window.location)try{const u=new URLSearchParams(window.location.search);if(l=u.get(r),l){if(s&&H_(l,{storageKey:t}),a){u.delete(r);const d=`${window.location.pathname}${u.toString()?`?${u.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,d)}return l}}catch(u){console.error("Error retrieving token from URL:",u)}if(typeof window<"u"&&window.localStorage)try{return l=window.localStorage.getItem(t),l}catch(u){console.error("Error retrieving token from local storage:",u)}return null}function H_(e,t){const{storageKey:r="base44_access_token"}=t;if(typeof window>"u"||!window.localStorage||!e)return!1;try{return window.localStorage.setItem(r,e),window.localStorage.setItem("token",e),!0}catch(s){return console.error("Error saving token to local storage:",s),!1}}function Og(e,t,r){const s=(l,u)=>l?`${String(l).replace(/\/$/,"")}${u}`:u,a=l=>{const u=new Headers;if(r!=null&&r.getAuthHeaders){const d=r.getAuthHeaders();Object.entries(d).forEach(([h,m])=>{m!=null&&u.set(h,String(m))})}return l&&new Headers(l).forEach((d,h)=>{u.set(h,d)}),u};return{async invoke(l,u){if(typeof u=="string")throw new Error(`Function ${l} must receive an object with named parameters, received: ${u}`);let d,h;return u instanceof FormData||u&&Object.values(u).some(m=>m instanceof File)?(d=new FormData,Object.keys(u).forEach(m=>{u[m]instanceof File?d.append(m,u[m],u[m].name):typeof u[m]=="object"&&u[m]!==null?d.append(m,JSON.stringify(u[m])):d.append(m,u[m])}),h="multipart/form-data"):(d=u,h="application/json"),e.post(`/apps/${t}/functions/${l}`,d||u,{headers:{"Content-Type":h}})},async fetch(l,u={}){const h=`/functions${l.startsWith("/")?l:`/${l}`}`,m=a(u.headers),g={...u,headers:m};return await fetch(s(r==null?void 0:r.baseURL,h),g)}}}function jg({axios:e,getSocket:t,appId:r,serverUrl:s,token:a}){const l=`/apps/${r}/agents`,u={},d=()=>e.get(`${l}/conversations`),h=v=>e.get(`${l}/conversations/${v}`);return{getConversations:d,getConversation:h,listConversations:v=>e.get(`${l}/conversations`,{params:v}),createConversation:v=>e.post(`${l}/conversations`,v),addMessage:async(v,S)=>e.post(`${l}/conversations/v2/${v.id}/messages`,S),subscribeToConversation:(v,S)=>{const R=`/agent-conversations/${v}`,P=t(),N=h(v).then(A=>(u[v]=A,A));return P.subscribeToRoom(R,{connect:()=>{},update_model:async({data:A})=>{const D=JSON.parse(A);if(D._message){await N;const V=D._message,H=u[v];if(H){const U=H.messages||[],X=U.findIndex(ee=>ee.id===V.id),re=X!==-1?U.map((ee,he)=>he===X?V:ee):[...U,V];u[v]={...H,messages:re},S==null||S(u[v])}}}})},getWhatsAppConnectURL:v=>{const S=`${s}/api/apps/${r}/agents/${encodeURIComponent(v)}/whatsapp`,R=a??wi();return R?`${S}?token=${R}`:S},getTelegramConnectURL:v=>{const S=`${s}/api/apps/${r}/agents/${encodeURIComponent(v)}/telegram`,R=a??wi();return R?`${S}?token=${R}`:S}}}function Lg(e,t){const r=`/app-logs/${t}`;return{async logUserInApp(s){await e.post(`${r}/log-user-in-app/${s}`)},async fetchLogs(s={}){return await e.get(r,{params:s})},async getStats(s={}){return await e.get(`${r}/stats`,{params:s})}}}function W_(e,t){return{async inviteUser(r,s){if(s!=="user"&&s!=="admin")throw new Error(`Invalid role: "${s}". Role must be either "user" or "admin".`);return await e.post(`/apps/${t}/runtime/users/invite-user`,{user_email:r,role:s})}}}const Nn=Object.create(null);Nn.open="0";Nn.close="1";Nn.ping="2";Nn.pong="3";Nn.message="4";Nn.upgrade="5";Nn.noop="6";const fl=Object.create(null);Object.keys(Nn).forEach(e=>{fl[Nn[e]]=e});const Ld={type:"error",data:"parser error"},Qv=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Yv=typeof ArrayBuffer=="function",Xv=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,xf=({type:e,data:t},r,s)=>Qv&&t instanceof Blob?r?s(t):Ig(t,s):Yv&&(t instanceof ArrayBuffer||Xv(t))?r?s(t):Ig(new Blob([t]),s):s(Nn[e]+(t||"")),Ig=(e,t)=>{const r=new FileReader;return r.onload=function(){const s=r.result.split(",")[1];t("b"+(s||""))},r.readAsDataURL(e)};function Mg(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Zu;function q_(e,t){if(Qv&&e.data instanceof Blob)return e.data.arrayBuffer().then(Mg).then(t);if(Yv&&(e.data instanceof ArrayBuffer||Xv(e.data)))return t(Mg(e.data));xf(e,!1,r=>{Zu||(Zu=new TextEncoder),t(Zu.encode(r))})}const Dg="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ui=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,r=e.length,s,a=0,l,u,d,h;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const m=new ArrayBuffer(t),g=new Uint8Array(m);for(s=0;s>4,g[a++]=(u&15)<<4|d>>2,g[a++]=(d&3)<<6|h&63;return m},Q_=typeof ArrayBuffer=="function",bf=(e,t)=>{if(typeof e!="string")return{type:"message",data:Gv(e,t)};const r=e.charAt(0);return r==="b"?{type:"message",data:Y_(e.substring(1),t)}:fl[r]?e.length>1?{type:fl[r],data:e.substring(1)}:{type:fl[r]}:Ld},Y_=(e,t)=>{if(Q_){const r=K_(e);return Gv(r,t)}else return{base64:!0,data:e}},Gv=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Jv="",X_=(e,t)=>{const r=e.length,s=new Array(r);let a=0;e.forEach((l,u)=>{xf(l,!1,d=>{s[u]=d,++a===r&&t(s.join(Jv))})})},G_=(e,t)=>{const r=e.split(Jv),s=[];for(let a=0;a{const s=r.length;let a;if(s<126)a=new Uint8Array(1),new DataView(a.buffer).setUint8(0,s);else if(s<65536){a=new Uint8Array(3);const l=new DataView(a.buffer);l.setUint8(0,126),l.setUint16(1,s)}else{a=new Uint8Array(9);const l=new DataView(a.buffer);l.setUint8(0,127),l.setBigUint64(1,BigInt(s))}e.data&&typeof e.data!="string"&&(a[0]|=128),t.enqueue(a),t.enqueue(r)})}})}let ed;function Ja(e){return e.reduce((t,r)=>t+r.length,0)}function Za(e,t){if(e[0].length===t)return e.shift();const r=new Uint8Array(t);let s=0;for(let a=0;aMath.pow(2,21)-1){d.enqueue(Ld);break}a=g*Math.pow(2,32)+m.getUint32(4),s=3}else{if(Ja(r)e){d.enqueue(Ld);break}}}})}const Zv=4;function tt(e){if(e)return eR(e)}function eR(e){for(var t in tt.prototype)e[t]=tt.prototype[t];return e}tt.prototype.on=tt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};tt.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this};tt.prototype.off=tt.prototype.removeListener=tt.prototype.removeAllListeners=tt.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var s,a=0;aPromise.resolve().then(t):(t,r)=>r(t,0),en=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),tR="arraybuffer";function e0(e,...t){return t.reduce((r,s)=>(e.hasOwnProperty(s)&&(r[s]=e[s]),r),{})}const nR=en.setTimeout,rR=en.clearTimeout;function Dl(e,t){t.useNativeTimers?(e.setTimeoutFn=nR.bind(en),e.clearTimeoutFn=rR.bind(en)):(e.setTimeoutFn=en.setTimeout.bind(en),e.clearTimeoutFn=en.clearTimeout.bind(en))}const oR=1.33;function sR(e){return typeof e=="string"?iR(e):Math.ceil((e.byteLength||e.size)*oR)}function iR(e){let t=0,r=0;for(let s=0,a=e.length;s=57344?r+=3:(s++,r+=4);return r}function t0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function aR(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}function lR(e){let t={},r=e.split("&");for(let s=0,a=r.length;s{this.readyState="paused",t()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||r()})),this.writable||(s++,this.once("drain",function(){--s||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const r=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};G_(t,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,X_(t,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=t0()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(t,r)}}let n0=!1;try{n0=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const dR=n0;function fR(){}class hR extends uR{constructor(t){if(super(t),typeof location<"u"){const r=location.protocol==="https:";let s=location.port;s||(s=r?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||s!==t.port}}doWrite(t,r){const s=this.request({method:"POST",data:t});s.on("success",r),s.on("error",(a,l)=>{this.onError("xhr post error",a,l)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(r,s)=>{this.onError("xhr poll error",r,s)}),this.pollXhr=t}}class _n extends tt{constructor(t,r,s){super(),this.createRequest=t,Dl(this,s),this._opts=s,this._method=s.method||"GET",this._uri=r,this._data=s.data!==void 0?s.data:null,this._create()}_create(){var t;const r=e0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const s=this._xhr=this.createRequest(r);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let a in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(a)&&s.setRequestHeader(a,this._opts.extraHeaders[a])}}catch{}if(this._method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var a;s.readyState===3&&((a=this._opts.cookieJar)===null||a===void 0||a.parseCookies(s.getResponseHeader("set-cookie"))),s.readyState===4&&(s.status===200||s.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof s.status=="number"?s.status:0)},0))},s.send(this._data)}catch(a){this.setTimeoutFn(()=>{this._onError(a)},0);return}typeof document<"u"&&(this._index=_n.requestsCount++,_n.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=fR,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete _n.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}_n.requestsCount=0;_n.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Fg);else if(typeof addEventListener=="function"){const e="onpagehide"in en?"pagehide":"unload";addEventListener(e,Fg,!1)}}function Fg(){for(let e in _n.requests)_n.requests.hasOwnProperty(e)&&_n.requests[e].abort()}const pR=(function(){const e=r0({xdomain:!1});return e&&e.responseType!==null})();class mR extends hR{constructor(t){super(t);const r=t&&t.forceBase64;this.supportsBinary=pR&&!r}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new _n(r0,this.uri(),t)}}function r0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||dR))return new XMLHttpRequest}catch{}if(!t)try{return new en[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const o0=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class gR extends Sf{get name(){return"websocket"}doOpen(){const t=this.uri(),r=this.opts.protocols,s=o0?{}:e0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,r,s)}catch(a){return this.emitReserved("error",a)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let r=0;r{try{this.doWrite(s,l)}catch{}a&&Ml(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=t0()),this.supportsBinary||(r.b64=1),this.createUri(t,r)}}const td=en.WebSocket||en.MozWebSocket;class yR extends gR{createSocket(t,r,s){return o0?new td(t,r,s):r?new td(t,r):new td(t)}doWrite(t,r){this.ws.send(r)}}class vR extends Sf{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const r=Z_(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=t.readable.pipeThrough(r).getReader(),a=J_();a.readable.pipeTo(t.writable),this._writer=a.writable.getWriter();const l=()=>{s.read().then(({done:d,value:h})=>{d||(this.onPacket(h),l())}).catch(d=>{})};l();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let r=0;r{a&&Ml(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const wR={websocket:yR,webtransport:vR,polling:mR},xR=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,bR=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Id(e){if(e.length>8e3)throw"URI too long";const t=e,r=e.indexOf("["),s=e.indexOf("]");r!=-1&&s!=-1&&(e=e.substring(0,r)+e.substring(r,s).replace(/:/g,";")+e.substring(s,e.length));let a=xR.exec(e||""),l={},u=14;for(;u--;)l[bR[u]]=a[u]||"";return r!=-1&&s!=-1&&(l.source=t,l.host=l.host.substring(1,l.host.length-1).replace(/;/g,":"),l.authority=l.authority.replace("[","").replace("]","").replace(/;/g,":"),l.ipv6uri=!0),l.pathNames=SR(l,l.path),l.queryKey=ER(l,l.query),l}function SR(e,t){const r=/\/{2,9}/g,s=t.replace(r,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&s.splice(0,1),t.slice(-1)=="/"&&s.splice(s.length-1,1),s}function ER(e,t){const r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,a,l){a&&(r[a]=l)}),r}const Md=typeof addEventListener=="function"&&typeof removeEventListener=="function",hl=[];Md&&addEventListener("offline",()=>{hl.forEach(e=>e())},!1);class Tr extends tt{constructor(t,r){if(super(),this.binaryType=tR,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(r=t,t=null),t){const s=Id(t);r.hostname=s.host,r.secure=s.protocol==="https"||s.protocol==="wss",r.port=s.port,s.query&&(r.query=s.query)}else r.host&&(r.hostname=Id(r.host).host);Dl(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(s=>{const a=s.prototype.name;this.transports.push(a),this._transportsByName[a]=s}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=lR(this.opts.query)),Md&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},hl.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const r=Object.assign({},this.opts.query);r.EIO=Zv,r.transport=t,this.id&&(r.sid=this.id);const s=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](s)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Tr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(t);r.open(),this.setTransport(r)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",Tr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=t.data,this._onError(r);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let s=0;s0&&r>this._maxPayload)return this.writeBuffer.slice(0,s);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Ml(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,r,s){return this._sendPacket("message",t,r,s),this}send(t,r,s){return this._sendPacket("message",t,r,s),this}_sendPacket(t,r,s,a){if(typeof r=="function"&&(a=r,r=void 0),typeof s=="function"&&(a=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const l={type:t,data:r,options:s};this.emitReserved("packetCreate",l),this.writeBuffer.push(l),a&&this.once("flush",a),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),t()},s=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():t()}):this.upgrading?s():t()),this}_onError(t){if(Tr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Md&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=hl.indexOf(this._offlineEventListener);s!==-1&&hl.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,r),this.writeBuffer=[],this._prevBufferLen=0}}}Tr.protocol=Zv;class CR extends Tr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t{s||(r.send([{type:"ping",data:"probe"}]),r.once("packet",y=>{if(!s)if(y.type==="pong"&&y.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;Tr.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(g(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const C=new Error("probe error");C.transport=r.name,this.emitReserved("upgradeError",C)}}))};function l(){s||(s=!0,g(),r.close(),r=null)}const u=y=>{const C=new Error("probe error: "+y);C.transport=r.name,l(),this.emitReserved("upgradeError",C)};function d(){u("transport closed")}function h(){u("socket closed")}function m(y){r&&y.name!==r.name&&l()}const g=()=>{r.removeListener("open",a),r.removeListener("error",u),r.removeListener("close",d),this.off("close",h),this.off("upgrading",m)};r.once("open",a),r.once("error",u),r.once("close",d),this.once("close",h),this.once("upgrading",m),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{s||r.open()},200):r.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const r=[];for(let s=0;swR[a]).filter(a=>!!a)),super(t,s)}};function _R(e,t="",r){let s=e;r=r||typeof location<"u"&&location,e==null&&(e=r.protocol+"//"+r.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=r.protocol+e:e=r.host+e),/^(https?|wss?):\/\//.test(e)||(typeof r<"u"?e=r.protocol+"//"+e:e="https://"+e),s=Id(e)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const l=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+l+":"+s.port+t,s.href=s.protocol+"://"+l+(r&&r.port===s.port?"":":"+s.port),s}const RR=typeof ArrayBuffer=="function",NR=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,s0=Object.prototype.toString,PR=typeof Blob=="function"||typeof Blob<"u"&&s0.call(Blob)==="[object BlobConstructor]",TR=typeof File=="function"||typeof File<"u"&&s0.call(File)==="[object FileConstructor]";function Ef(e){return RR&&(e instanceof ArrayBuffer||NR(e))||PR&&e instanceof Blob||TR&&e instanceof File}function pl(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let r=0,s=e.length;r=0&&e.num{delete this.acks[t];for(let d=0;d{this.io.clearTimeoutFn(l),r.apply(this,d)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...r){return new Promise((s,a)=>{const l=(u,d)=>u?a(u):s(d);l.withError=!0,r.push(l),this.emit(t,...r)})}_addToQueue(t){let r;typeof t[t.length-1]=="function"&&(r=t.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((a,...l)=>(this._queue[0],a!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(a)):(this._queue.shift(),r&&r(null,...l)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!t||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:je.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(s=>String(s.id)===t)){const s=this.acks[t];delete this.acks[t],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case je.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case je.EVENT:case je.BINARY_EVENT:this.onevent(t);break;case je.ACK:case je.BINARY_ACK:this.onack(t);break;case je.DISCONNECT:this.ondisconnect();break;case je.CONNECT_ERROR:this.destroy();const s=new Error(t.data.message);s.data=t.data.data,this.emitReserved("connect_error",s);break}}onevent(t){const r=t.data||[];t.id!=null&&r.push(this.ack(t.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const s of r)s.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const r=this;let s=!1;return function(...a){s||(s=!0,r.packet({type:je.ACK,id:t,data:a}))}}onack(t){const r=this.acks[t.id];typeof r=="function"&&(delete this.acks[t.id],r.withError&&t.data.unshift(null),r.apply(this,t.data))}onconnect(t,r){this.id=t,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:je.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const r=this._anyListeners;for(let s=0;s0&&e.jitter<=1?e.jitter:0,this.attempts=0}ps.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-r:e+r}return Math.min(e,this.max)|0};ps.prototype.reset=function(){this.attempts=0};ps.prototype.setMin=function(e){this.ms=e};ps.prototype.setMax=function(e){this.max=e};ps.prototype.setJitter=function(e){this.jitter=e};class Ud extends tt{constructor(t,r){var s;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(r=t,t=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,Dl(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((s=r.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new ps({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=t;const a=r.parser||MR;this.encoder=new a.Encoder,this.decoder=new a.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var r;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(r=this.backoff)===null||r===void 0||r.setMin(t),this)}randomizationFactor(t){var r;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(r=this.backoff)===null||r===void 0||r.setJitter(t),this)}reconnectionDelayMax(t){var r;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(r=this.backoff)===null||r===void 0||r.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new kR(this.uri,this.opts);const r=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const a=fn(r,"open",function(){s.onopen(),t&&t()}),l=d=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",d),t?t(d):this.maybeReconnectOnOpen()},u=fn(r,"error",l);if(this._timeout!==!1){const d=this._timeout,h=this.setTimeoutFn(()=>{a(),l(new Error("timeout")),r.close()},d);this.opts.autoUnref&&h.unref(),this.subs.push(()=>{this.clearTimeoutFn(h)})}return this.subs.push(a),this.subs.push(u),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(fn(t,"ping",this.onping.bind(this)),fn(t,"data",this.ondata.bind(this)),fn(t,"error",this.onerror.bind(this)),fn(t,"close",this.onclose.bind(this)),fn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(r){this.onclose("parse error",r)}}ondecoded(t){Ml(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,r){let s=this.nsps[t];return s?this._autoConnect&&!s.active&&s.connect():(s=new i0(this,t,r),this.nsps[t]=s),s}_destroy(t){const r=Object.keys(this.nsps);for(const s of r)if(this.nsps[s].active)return;this._close()}_packet(t){const r=this.encoder.encode(t);for(let s=0;st()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,r){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(a=>{a?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",a)):t.onreconnect()}))},r);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const ii={};function ml(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const r=_R(e,t.path||"/socket.io"),s=r.source,a=r.id,l=r.path,u=ii[a]&&l in ii[a].nsps,d=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let h;return d?h=new Ud(s,t):(ii[a]||(ii[a]=new Ud(s,t)),h=ii[a]),r.query&&!t.query&&(t.query=r.queryKey),h.socket(r.path,t)}Object.assign(ml,{Manager:Ud,Socket:i0,io:ml,connect:ml});function Bg(e,t){var r;const s=ml(e.serverUrl,{path:e.mountPath,transports:e.transports,query:{app_id:e.appId,token:(r=e.token)!==null&&r!==void 0?r:wi()}});return s.on("connect",async()=>{var a;return console.log("connect",s.id),(a=t.connect)===null||a===void 0?void 0:a.call(t)}),s.on("update_model",async a=>{var l;return(l=t.update_model)===null||l===void 0?void 0:l.call(t,a)}),s.on("error",async a=>{var l;return(l=t.error)===null||l===void 0?void 0:l.call(t,a)}),s.on("connect_error",async a=>{var l;return console.error("connect_error",a),(l=t.error)===null||l===void 0?void 0:l.call(t,a)}),s}function FR({config:e}){let t={...e};const r={},s={connect:async()=>{const k=[];Object.keys(r).forEach(E=>{h(E);const v=y(E);v==null||v.forEach(({connect:S})=>{const R=async()=>S==null?void 0:S();k.push(R())})}),await Promise.all(k)},update_model:async k=>{const v=y(k.room).map(S=>{var R;return(R=S.update_model)===null||R===void 0?void 0:R.call(S,k)});await Promise.all(v)},error:async k=>{console.error("error",k);const E=Object.values(r).flat().map(v=>{var S;return(S=v.error)===null||S===void 0?void 0:S.call(v,k)});await Promise.all(E)}};let a=Bg(e,s);function l(){u()}function u(){a&&a.disconnect()}function d(k){l(),t={...t,...k},a=Bg(t,s)}function h(k){a.emit("join",k)}function m(k){a.emit("leave",k)}async function g(k,E){var v;const S=JSON.stringify(E);return(v=s.update_model)===null||v===void 0?void 0:v.call(s,{room:k,data:S})}function y(k){return r[k]}return{socket:a,subscribeToRoom:(k,E)=>(r[k]||(h(k),r[k]=[]),r[k].push(E),()=>{var v,S;r[k]=(S=(v=r[k])===null||v===void 0?void 0:v.filter(R=>R!==E))!==null&&S!==void 0?S:[],r[k].length===0&&m(k)}),updateConfig:d,updateModel:g,disconnect:u}}const ai=typeof window<"u"?window:{base44SharedInstances:{}};function UR(e,t){return ai.base44SharedInstances||(ai.base44SharedInstances={}),ai.base44SharedInstances[e]||(ai.base44SharedInstances[e]={instance:t()}),ai.base44SharedInstances[e].instance}const BR="__user_heartbeat_event__",zR="__initialization_event__",$R="__session_duration_event__",zg="analytics-enable",$g="base44_analytics_session_id",VR={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},HR="analytics",Ue=UR(HR,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,config:{...VR,...JR()}})),WR=({axiosClient:e,serverUrl:t,appId:r,userAuthModule:s})=>{var a;const{maxQueueSize:l,throttleTime:u,batchSize:d}=Ue.config;if(!(!((a=Ue.config)===null||a===void 0)&&a.enabled))return{track:()=>{},cleanup:()=>{}};let h;const m=`${t}/api/apps/${r}/analytics/track/batch`,g=async N=>{await e.request({method:"POST",url:`/apps/${r}/analytics/track/batch`,data:{events:N}})},y=N=>{try{const A=JSON.stringify({events:N}),D=new Blob([A],{type:"application/json"});return typeof navigator>"u"||A.length>6e4||!navigator.sendBeacon(m,D)}catch{return!1}},C=async(N,A={})=>{if(N.length===0)return;const D=await GR(s),V=N.map(XR(D));try{(!A.isBeacon||!y(V))&&await g(V)}catch{}},k=()=>{Hg(C,{throttleTime:u,batchSize:d})},E=N=>{if(Ue.requestsQueue.length>=l)return;const A=YR();Ue.requestsQueue.push({...N,...A}),k()},v=()=>{Hg(C,{throttleTime:u,batchSize:d}),h=Wg(E),KR()},S=()=>{Vg(),h==null||h(),QR(E);const N=Ue.requestsQueue.splice(0);C(N,{isBeacon:!0})},R=()=>{typeof window>"u"||(document.visibilityState==="hidden"?S():document.visibilityState==="visible"&&v())},P=()=>{Vg(),h==null||h(),typeof window<"u"&&window.removeEventListener("visibilitychange",R)};return k(),h=Wg(E),qR(E),typeof window<"u"&&window.addEventListener("visibilitychange",R),{track:E,cleanup:P}};function Vg(){Ue.isProcessing=!1}async function Hg(e,t){if(Ue.isProcessing)return;Ue.isProcessing=!0;const{throttleTime:r=1e3,batchSize:s=30}=t??{};for(;Ue.isProcessing&&Ue.requestsQueue.length>0;){const a=Ue.requestsQueue.splice(0,s);a.length&&await e(a),await new Promise(l=>setTimeout(l,r))}Ue.isProcessing=!1}function Wg(e){var t;if(Ue.isHeartBeatProcessing||((t=Ue.config.heartBeatInterval)!==null&&t!==void 0?t:0)<10)return()=>{};Ue.isHeartBeatProcessing=!0;const r=setInterval(()=>{e({eventName:BR})},Ue.config.heartBeatInterval);return()=>{clearInterval(r),Ue.isHeartBeatProcessing=!1}}function qR(e){typeof window>"u"||Ue.wasInitializationTracked||(Ue.wasInitializationTracked=!0,e({eventName:zR,properties:{referrer:document==null?void 0:document.referrer}}))}function KR(){typeof window>"u"||Ue.sessionStartTime!==null||(Ue.sessionStartTime=new Date().toISOString())}function QR(e){if(typeof window>"u"||Ue.sessionStartTime===null)return;const t=new Date().getTime()-new Date(Ue.sessionStartTime).getTime();Ue.sessionStartTime=null,e({eventName:$R,properties:{sessionDuration:t}})}function YR(){return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"?window.location.pathname:null}}function XR(e){return t=>({event_name:t.eventName,properties:t.properties,timestamp:t.timestamp,page_url:t.pageUrl,...e})}let nd=null;async function GR(e){if(!Ue.sessionContext){if(!nd){const t=ZR();nd=e.me().then(r=>({user_id:r.id,session_id:t})).catch(()=>({user_id:null,session_id:t}))}Ue.sessionContext=await nd}return Ue.sessionContext}function JR(){if(typeof window>"u")return;const t=new URLSearchParams(window.location.search).get(zg);if(t==null||!t.length)return;const r=new URLSearchParams(window.location.search);r.delete(zg);const s=window.location.pathname+(r.toString()?"?"+r.toString():"");return window.history.replaceState({},"",s),{enabled:t==="true"}}function ZR(){if(typeof window>"u")return Gu();try{const e=localStorage.getItem($g);if(!e){const t=Gu();return localStorage.setItem($g,t),t}return e}catch{return Gu()}}function eN(e){var t,r;const{serverUrl:s="https://base44.app",appId:a,token:l,serviceToken:u,requiresAuth:d=!1,appBaseUrl:h,options:m,functionsVersion:g,headers:y}=e,C=typeof h=="string"?h:"",k={serverUrl:s,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:a,token:l};let E=null;const v=()=>(E||(E=FR({config:k})),E),S={...y,"X-App-Id":String(a)},R=g?{...S,"Base44-Functions-Version":g}:S,P=ci({baseURL:`${s}/api`,headers:S,token:l,onError:m==null?void 0:m.onError}),N=ci({baseURL:`${s}/api`,headers:R,token:l,interceptResponses:!1,onError:m==null?void 0:m.onError}),A={...S,...l?{"on-behalf-of":`Bearer ${l}`}:{}},D=ci({baseURL:`${s}/api`,headers:A,token:u,onError:m==null?void 0:m.onError}),V=ci({baseURL:`${s}/api`,headers:R,token:u,interceptResponses:!1}),H=B_(P,N,a,{appBaseUrl:C}),U={entities:Tg({axios:P,appId:a,getSocket:v}),integrations:Ag(P,a),connectors:V_(P,a),auth:H,functions:Og(N,a,{getAuthHeaders:()=>{const ee={},he=l||wi();return he&&(ee.Authorization=`Bearer ${he}`),ee},baseURL:(t=N.defaults)===null||t===void 0?void 0:t.baseURL}),agents:jg({axios:P,getSocket:v,appId:a,serverUrl:s,token:l}),appLogs:Lg(P,a),users:W_(P,a),analytics:WR({axiosClient:P,serverUrl:s,appId:a,userAuthModule:H}),cleanup:()=>{U.analytics.cleanup(),E&&E.disconnect()}},X={entities:Tg({axios:D,appId:a,getSocket:v}),integrations:Ag(D,a),sso:z_(D,a),connectors:$_(D,a),functions:Og(V,a,{getAuthHeaders:()=>{const ee={};return u&&(ee.Authorization=`Bearer ${u}`),ee},baseURL:(r=V.defaults)===null||r===void 0?void 0:r.baseURL}),agents:jg({axios:D,getSocket:v,appId:a,serverUrl:s,token:l}),appLogs:Lg(D,a),cleanup:()=>{E&&E.disconnect()}};if(typeof window<"u"){const ee=l||wi();ee&&U.auth.setToken(ee)}return d&&typeof window<"u"&&setTimeout(async()=>{try{await U.auth.isAuthenticated()||U.auth.redirectToLogin(window.location.href)}catch(ee){console.error("Authentication check failed:",ee),U.auth.redirectToLogin(window.location.href)}},0),{...U,setToken(ee){U.auth.setToken(ee),E&&E.updateConfig({token:ee}),k.token=ee},getConfig(){return{serverUrl:s,appId:a,requiresAuth:d}},get asServiceRole(){if(!u)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return X}}}const a0=typeof window>"u",tN=a0?{localStorage:new Map}:window,pi=tN.localStorage,nN=e=>e.replace(/([A-Z])/g,"_$1").toLowerCase(),Wo=(e,{defaultValue:t=void 0,removeFromUrl:r=!1}={})=>{if(a0)return t;const s=`base44_${nN(e)}`,a=new URLSearchParams(window.location.search),l=a.get(e);if(r){a.delete(e);const d=`${window.location.pathname}${a.toString()?`?${a.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,d)}if(l)return pi.setItem(s,l),l;if(t)return pi.setItem(s,t),t;const u=pi.getItem(s);return u||null},rN=()=>(Wo("clear_access_token")==="true"&&(pi.removeItem("base44_access_token"),pi.removeItem("token")),{appId:Wo("app_id",{defaultValue:"69f25971fd0e7c38714c36fa"}),token:Wo("access_token",{removeFromUrl:!0}),fromUrl:Wo("from_url",{defaultValue:window.location.href}),functionsVersion:Wo("functions_version",{defaultValue:"prod"}),appBaseUrl:Wo("app_base_url",{defaultValue:void 0})}),di={...rN()},{appId:oN,token:sN,functionsVersion:iN,appBaseUrl:aN}=di,Zr=eN({appId:oN,token:sN,functionsVersion:iN,serverUrl:"",requiresAuth:!1,appBaseUrl:aN});function lN({}){var a;const t=Pi().pathname.substring(1),{data:r,isFetched:s}=WE({queryKey:["user"],queryFn:async()=>{try{return{user:await Zr.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return b.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:b.jsx("div",{className:"max-w-md w-full",children:b.jsxs("div",{className:"text-center space-y-6",children:[b.jsxs("div",{className:"space-y-2",children:[b.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),b.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),b.jsxs("div",{className:"space-y-3",children:[b.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),b.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",b.jsxs("span",{className:"font-medium text-slate-700",children:['"',t,'"']})," could not be found in this application."]})]}),s&&r.isAuthenticated&&((a=r.user)==null?void 0:a.role)==="admin"&&b.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:b.jsxs("div",{className:"flex items-start space-x-3",children:[b.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:b.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),b.jsxs("div",{className:"text-left space-y-1",children:[b.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),b.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat."})]})]})}),b.jsx("div",{className:"pt-6",children:b.jsxs("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500",children:[b.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Go Home"]})})]})})})}const l0=x.createContext(),cN=({children:e})=>{const[t,r]=x.useState(null),[s,a]=x.useState(!1),[l,u]=x.useState(!0),[d,h]=x.useState(!0),[m,g]=x.useState(null),[y,C]=x.useState(!1),[k,E]=x.useState(null);x.useEffect(()=>{v()},[]);const v=async()=>{var N,A;try{h(!0),g(null);const D=ci({baseURL:"/api/apps/public",headers:{"X-App-Id":di.appId},token:di.token,interceptResponses:!0});try{const V=await D.get(`/prod/public-settings/by-id/${di.appId}`);E(V),di.token?await S():(u(!1),a(!1),C(!0)),h(!1)}catch(V){if(console.error("App state check failed:",V),V.status===403&&((A=(N=V.data)==null?void 0:N.extra_data)!=null&&A.reason)){const H=V.data.extra_data.reason;g(H==="auth_required"?{type:"auth_required",message:"Authentication required"}:H==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:H,message:V.message})}else g({type:"unknown",message:V.message||"Failed to load app"});h(!1),u(!1)}}catch(D){console.error("Unexpected error:",D),g({type:"unknown",message:D.message||"An unexpected error occurred"}),h(!1),u(!1)}},S=async()=>{try{u(!0);const N=await Zr.auth.me();r(N),a(!0),u(!1),C(!0)}catch(N){console.error("User auth check failed:",N),u(!1),a(!1),C(!0),(N.status===401||N.status===403)&&g({type:"auth_required",message:"Authentication required"})}},R=(N=!0)=>{r(null),a(!1),N?Zr.auth.logout(window.location.href):Zr.auth.logout()},P=()=>{Zr.auth.redirectToLogin(window.location.href)};return b.jsx(l0.Provider,{value:{user:t,isAuthenticated:s,isLoadingAuth:l,isLoadingPublicSettings:d,authError:m,appPublicSettings:k,authChecked:y,logout:R,navigateToLogin:P,checkUserAuth:S,checkAppState:v},children:e})},uN=()=>{const e=x.useContext(l0);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e},dN=()=>b.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:b.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:b.jsxs("div",{className:"text-center",children:[b.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:b.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),b.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),b.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),b.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[b.jsx("p",{children:"If you believe this is an error, you can:"}),b.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[b.jsx("li",{children:"Verify you are logged in with the correct account"}),b.jsx("li",{children:"Contact the app administrator for access"}),b.jsx("li",{children:"Try logging out and back in again"})]})]})]})})});function fN(){return b.jsx("section",{className:"bg-background py-16 px-6",children:b.jsxs("div",{className:"max-w-[1280px] mx-auto text-center",children:[b.jsxs("nav",{className:"text-[13px] text-muted-foreground mb-6 tracking-wide",children:[b.jsx(XC,{to:"/",className:"hover:text-foreground transition-colors",children:"Home"}),b.jsx("span",{className:"mx-2",children:"/"}),b.jsx("span",{className:"text-foreground font-medium",children:"Report a Concern"})]}),b.jsx("div",{className:"flex justify-center mb-6",children:b.jsx("div",{className:"w-14 h-14 rounded-full bg-navy/5 flex items-center justify-center",children:b.jsx(rf,{className:"w-7 h-7 text-navy"})})}),b.jsx("h1",{className:"text-[44px] md:text-[52px] font-bold text-navy leading-tight tracking-tight",children:"Report a Concern"}),b.jsx("p",{className:"text-[28px] md:text-[32px] font-tajawal text-blue-accent mt-1",children:"الإبلاغ عن مخاوف"}),b.jsx("p",{className:"text-lg text-gold font-medium mt-4 tracking-wide",children:"Your Preferred Partner in GCC"}),b.jsx("div",{className:"max-w-[800px] mx-auto mt-8 pt-6 border-t border-border",children:b.jsxs("p",{className:"text-[13px] leading-relaxed text-muted-foreground",children:["Almanza Investment Company KSCC is a Kuwaiti Shareholding Company, incorporated in the State of Kuwait in 1998. Licensed by the ",b.jsx("strong",{className:"text-foreground",children:"Capital Markets Authority (CMA) of Kuwait"})," and regulated by the"," ",b.jsx("strong",{className:"text-foreground",children:"Central Bank of Kuwait (CBK)"})," where applicable, in accordance with the Kuwait Ministry of Commerce and Industry. This page provides a secure, confidential channel for reporting concerns."]})})]})})}const hN=[{icon:lS,text:"Fraud, corruption, or financial misconduct"},{icon:tS,text:"Violations of CMA, CBK, or Ministry regulations"},{icon:rS,text:"Shari'a non-compliance in investment activities"},{icon:of,text:"Conflicts of interest or unethical conduct"},{icon:Mb,text:"Harassment, discrimination, or workplace misconduct"},{icon:$b,text:"Health, safety, or environmental violations"}];function pN(){return b.jsx("section",{className:"bg-secondary py-12 md:py-16 px-6",children:b.jsxs("div",{className:"max-w-[900px] mx-auto",children:[b.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-navy mb-2",children:"Commitment to Integrity & Transparency"}),b.jsx("div",{className:"w-12 h-[2px] bg-gold mb-6"}),b.jsx("p",{className:"text-[15px] leading-relaxed text-muted-foreground mb-8",children:"Almanza is committed to the highest standards of ethical conduct, transparency, and accountability, in accordance with the provisions of Islamic Shari'a and the regulations of the Kuwait Capital Markets Authority, Central Bank of Kuwait, and Kuwait Ministry of Commerce and Industry. We encourage employees, clients, partners, and third parties to report any concerns regarding:"}),b.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 mb-8",children:hN.map(({icon:e,text:t})=>b.jsxs("div",{className:"flex items-start gap-3 p-4 bg-background rounded-lg border border-border/60",children:[b.jsx(e,{className:"w-5 h-5 text-gold mt-0.5 flex-shrink-0"}),b.jsx("span",{className:"text-sm text-foreground leading-snug",children:t})]},t))}),b.jsx("p",{className:"text-[15px] leading-relaxed text-muted-foreground font-medium",children:"All reports are treated seriously and investigated promptly."})]})})}const Bd=x.forwardRef(({className:e,type:t,...r},s)=>b.jsx("input",{type:t,className:ft("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:s,...r}));Bd.displayName="Input";const c0=x.forwardRef(({className:e,...t},r)=>b.jsx("textarea",{className:ft("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...t}));c0.displayName="Textarea";function qg(e,[t,r]){return Math.min(r,Math.max(t,e))}function Xe(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e==null||e(a),r===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function Fl(e,t=[]){let r=[];function s(l,u){const d=x.createContext(u),h=r.length;r=[...r,u];const m=y=>{var R;const{scope:C,children:k,...E}=y,v=((R=C==null?void 0:C[e])==null?void 0:R[h])||d,S=x.useMemo(()=>E,Object.values(E));return b.jsx(v.Provider,{value:S,children:k})};m.displayName=l+"Provider";function g(y,C){var v;const k=((v=C==null?void 0:C[e])==null?void 0:v[h])||d,E=x.useContext(k);if(E)return E;if(u!==void 0)return u;throw new Error(`\`${y}\` must be used within \`${l}\``)}return[m,g]}const a=()=>{const l=r.map(u=>x.createContext(u));return function(d){const h=(d==null?void 0:d[e])||l;return x.useMemo(()=>({[`__scope${e}`]:{...d,[e]:h}}),[d,h])}};return a.scopeName=e,[s,mN(a,...t)]}function mN(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const s=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(l){const u=s.reduce((d,{useScope:h,scopeName:m})=>{const y=h(l)[`__scope${m}`];return{...d,...y}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return r.scopeName=t.scopeName,r}function Kg(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ii(...e){return t=>{let r=!1;const s=e.map(a=>{const l=Kg(a,t);return!r&&typeof l=="function"&&(r=!0),l});if(r)return()=>{for(let a=0;a{const{children:l,...u}=s,d=x.Children.toArray(l),h=d.find(vN);if(h){const m=h.props.children,g=d.map(y=>y===h?x.Children.count(m)>1?x.Children.only(null):x.isValidElement(m)?m.props.children:null:y);return b.jsx(t,{...u,ref:a,children:x.isValidElement(m)?x.cloneElement(m,void 0,g):null})}return b.jsx(t,{...u,ref:a,children:l})});return r.displayName=`${e}.Slot`,r}function gN(e){const t=x.forwardRef((r,s)=>{const{children:a,...l}=r;if(x.isValidElement(a)){const u=xN(a),d=wN(l,a.props);return a.type!==x.Fragment&&(d.ref=s?Ii(s,u):u),x.cloneElement(a,d)}return x.Children.count(a)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var yN=Symbol("radix.slottable");function vN(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===yN}function wN(e,t){const r={...t};for(const s in t){const a=e[s],l=t[s];/^on[A-Z]/.test(s)?a&&l?r[s]=(...d)=>{const h=l(...d);return a(...d),h}:a&&(r[s]=a):s==="style"?r[s]={...a,...l}:s==="className"&&(r[s]=[a,l].filter(Boolean).join(" "))}return{...e,...r}}function xN(e){var s,a;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function bN(e){const t=e+"CollectionProvider",[r,s]=Fl(t),[a,l]=r(t,{collectionRef:{current:null},itemMap:new Map}),u=v=>{const{scope:S,children:R}=v,P=zt.useRef(null),N=zt.useRef(new Map).current;return b.jsx(a,{scope:S,itemMap:N,collectionRef:P,children:R})};u.displayName=t;const d=e+"CollectionSlot",h=Qg(d),m=zt.forwardRef((v,S)=>{const{scope:R,children:P}=v,N=l(d,R),A=rt(S,N.collectionRef);return b.jsx(h,{ref:A,children:P})});m.displayName=d;const g=e+"CollectionItemSlot",y="data-radix-collection-item",C=Qg(g),k=zt.forwardRef((v,S)=>{const{scope:R,children:P,...N}=v,A=zt.useRef(null),D=rt(S,A),V=l(g,R);return zt.useEffect(()=>(V.itemMap.set(A,{ref:A,...N}),()=>void V.itemMap.delete(A))),b.jsx(C,{[y]:"",ref:D,children:P})});k.displayName=g;function E(v){const S=l(e+"CollectionConsumer",v);return zt.useCallback(()=>{const P=S.collectionRef.current;if(!P)return[];const N=Array.from(P.querySelectorAll(`[${y}]`));return Array.from(S.itemMap.values()).sort((V,H)=>N.indexOf(V.ref.current)-N.indexOf(H.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:u,Slot:m,ItemSlot:k},E,s]}var SN=x.createContext(void 0);function EN(e){const t=x.useContext(SN);return e||t||"ltr"}function CN(e){const t=kN(e),r=x.forwardRef((s,a)=>{const{children:l,...u}=s,d=x.Children.toArray(l),h=d.find(RN);if(h){const m=h.props.children,g=d.map(y=>y===h?x.Children.count(m)>1?x.Children.only(null):x.isValidElement(m)?m.props.children:null:y);return b.jsx(t,{...u,ref:a,children:x.isValidElement(m)?x.cloneElement(m,void 0,g):null})}return b.jsx(t,{...u,ref:a,children:l})});return r.displayName=`${e}.Slot`,r}function kN(e){const t=x.forwardRef((r,s)=>{const{children:a,...l}=r;if(x.isValidElement(a)){const u=PN(a),d=NN(l,a.props);return a.type!==x.Fragment&&(d.ref=s?Ii(s,u):u),x.cloneElement(a,d)}return x.Children.count(a)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var _N=Symbol("radix.slottable");function RN(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_N}function NN(e,t){const r={...t};for(const s in t){const a=e[s],l=t[s];/^on[A-Z]/.test(s)?a&&l?r[s]=(...d)=>{const h=l(...d);return a(...d),h}:a&&(r[s]=a):s==="style"?r[s]={...a,...l}:s==="className"&&(r[s]=[a,l].filter(Boolean).join(" "))}return{...e,...r}}function PN(e){var s,a;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var TN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],He=TN.reduce((e,t)=>{const r=CN(`Primitive.${t}`),s=x.forwardRef((a,l)=>{const{asChild:u,...d}=a,h=u?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(h,{...d,ref:l})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{});function AN(e,t){e&&Ri.flushSync(()=>e.dispatchEvent(t))}function ho(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...r)=>{var s;return(s=t.current)==null?void 0:s.call(t,...r)},[])}function ON(e,t=globalThis==null?void 0:globalThis.document){const r=ho(e);x.useEffect(()=>{const s=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",s,{capture:!0}),()=>t.removeEventListener("keydown",s,{capture:!0})},[r,t])}var jN="DismissableLayer",zd="dismissableLayer.update",LN="dismissableLayer.pointerDownOutside",IN="dismissableLayer.focusOutside",Yg,u0=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),d0=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:l,onInteractOutside:u,onDismiss:d,...h}=e,m=x.useContext(u0),[g,y]=x.useState(null),C=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,k]=x.useState({}),E=rt(t,H=>y(H)),v=Array.from(m.layers),[S]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),R=v.indexOf(S),P=g?v.indexOf(g):-1,N=m.layersWithOutsidePointerEventsDisabled.size>0,A=P>=R,D=FN(H=>{const U=H.target,X=[...m.branches].some(re=>re.contains(U));!A||X||(a==null||a(H),u==null||u(H),H.defaultPrevented||d==null||d())},C),V=UN(H=>{const U=H.target;[...m.branches].some(re=>re.contains(U))||(l==null||l(H),u==null||u(H),H.defaultPrevented||d==null||d())},C);return ON(H=>{P===m.layers.size-1&&(s==null||s(H),!H.defaultPrevented&&d&&(H.preventDefault(),d()))},C),x.useEffect(()=>{if(g)return r&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(Yg=C.body.style.pointerEvents,C.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(g)),m.layers.add(g),Xg(),()=>{r&&m.layersWithOutsidePointerEventsDisabled.size===1&&(C.body.style.pointerEvents=Yg)}},[g,C,r,m]),x.useEffect(()=>()=>{g&&(m.layers.delete(g),m.layersWithOutsidePointerEventsDisabled.delete(g),Xg())},[g,m]),x.useEffect(()=>{const H=()=>k({});return document.addEventListener(zd,H),()=>document.removeEventListener(zd,H)},[]),b.jsx(He.div,{...h,ref:E,style:{pointerEvents:N?A?"auto":"none":void 0,...e.style},onFocusCapture:Xe(e.onFocusCapture,V.onFocusCapture),onBlurCapture:Xe(e.onBlurCapture,V.onBlurCapture),onPointerDownCapture:Xe(e.onPointerDownCapture,D.onPointerDownCapture)})});d0.displayName=jN;var MN="DismissableLayerBranch",DN=x.forwardRef((e,t)=>{const r=x.useContext(u0),s=x.useRef(null),a=rt(t,s);return x.useEffect(()=>{const l=s.current;if(l)return r.branches.add(l),()=>{r.branches.delete(l)}},[r.branches]),b.jsx(He.div,{...e,ref:a})});DN.displayName=MN;function FN(e,t=globalThis==null?void 0:globalThis.document){const r=ho(e),s=x.useRef(!1),a=x.useRef(()=>{});return x.useEffect(()=>{const l=d=>{if(d.target&&!s.current){let h=function(){f0(LN,r,m,{discrete:!0})};const m={originalEvent:d};d.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=h,t.addEventListener("click",a.current,{once:!0})):h()}else t.removeEventListener("click",a.current);s.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",l),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>s.current=!0}}function UN(e,t=globalThis==null?void 0:globalThis.document){const r=ho(e),s=x.useRef(!1);return x.useEffect(()=>{const a=l=>{l.target&&!s.current&&f0(IN,r,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function Xg(){const e=new CustomEvent(zd);document.dispatchEvent(e)}function f0(e,t,r,{discrete:s}){const a=r.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),s?AN(a,l):a.dispatchEvent(l)}var rd=0;function BN(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Gg()),document.body.insertAdjacentElement("beforeend",e[1]??Gg()),rd++,()=>{rd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),rd--}},[])}function Gg(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var od="focusScope.autoFocusOnMount",sd="focusScope.autoFocusOnUnmount",Jg={bubbles:!1,cancelable:!0},zN="FocusScope",h0=x.forwardRef((e,t)=>{const{loop:r=!1,trapped:s=!1,onMountAutoFocus:a,onUnmountAutoFocus:l,...u}=e,[d,h]=x.useState(null),m=ho(a),g=ho(l),y=x.useRef(null),C=rt(t,v=>h(v)),k=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(s){let v=function(N){if(k.paused||!d)return;const A=N.target;d.contains(A)?y.current=A:vr(y.current,{select:!0})},S=function(N){if(k.paused||!d)return;const A=N.relatedTarget;A!==null&&(d.contains(A)||vr(y.current,{select:!0}))},R=function(N){if(document.activeElement===document.body)for(const D of N)D.removedNodes.length>0&&vr(d)};document.addEventListener("focusin",v),document.addEventListener("focusout",S);const P=new MutationObserver(R);return d&&P.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",S),P.disconnect()}}},[s,d,k.paused]),x.useEffect(()=>{if(d){ey.add(k);const v=document.activeElement;if(!d.contains(v)){const R=new CustomEvent(od,Jg);d.addEventListener(od,m),d.dispatchEvent(R),R.defaultPrevented||($N(KN(p0(d)),{select:!0}),document.activeElement===v&&vr(d))}return()=>{d.removeEventListener(od,m),setTimeout(()=>{const R=new CustomEvent(sd,Jg);d.addEventListener(sd,g),d.dispatchEvent(R),R.defaultPrevented||vr(v??document.body,{select:!0}),d.removeEventListener(sd,g),ey.remove(k)},0)}}},[d,m,g,k]);const E=x.useCallback(v=>{if(!r&&!s||k.paused)return;const S=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,R=document.activeElement;if(S&&R){const P=v.currentTarget,[N,A]=VN(P);N&&A?!v.shiftKey&&R===A?(v.preventDefault(),r&&vr(N,{select:!0})):v.shiftKey&&R===N&&(v.preventDefault(),r&&vr(A,{select:!0})):R===P&&v.preventDefault()}},[r,s,k.paused]);return b.jsx(He.div,{tabIndex:-1,...u,ref:C,onKeyDown:E})});h0.displayName=zN;function $N(e,{select:t=!1}={}){const r=document.activeElement;for(const s of e)if(vr(s,{select:t}),document.activeElement!==r)return}function VN(e){const t=p0(e),r=Zg(t,e),s=Zg(t.reverse(),e);return[r,s]}function p0(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const a=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||a?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Zg(e,t){for(const r of e)if(!HN(r,{upTo:t}))return r}function HN(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function WN(e){return e instanceof HTMLInputElement&&"select"in e}function vr(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&WN(e)&&t&&e.select()}}var ey=qN();function qN(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=ty(e,t),e.unshift(t)},remove(t){var r;e=ty(e,t),(r=e[0])==null||r.resume()}}}function ty(e,t){const r=[...e],s=r.indexOf(t);return s!==-1&&r.splice(s,1),r}function KN(e){return e.filter(t=>t.tagName!=="A")}var Et=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},QN=Pl[" useId ".trim().toString()]||(()=>{}),YN=0;function kf(e){const[t,r]=x.useState(QN());return Et(()=>{r(s=>s??String(YN++))},[e]),t?`radix-${t}`:""}const XN=["top","right","bottom","left"],Or=Math.min,$t=Math.max,El=Math.round,el=Math.floor,Rn=e=>({x:e,y:e}),GN={left:"right",right:"left",bottom:"top",top:"bottom"},JN={start:"end",end:"start"};function $d(e,t,r){return $t(e,Or(t,r))}function Wn(e,t){return typeof e=="function"?e(t):e}function qn(e){return e.split("-")[0]}function ms(e){return e.split("-")[1]}function _f(e){return e==="x"?"y":"x"}function Rf(e){return e==="y"?"height":"width"}const ZN=new Set(["top","bottom"]);function kn(e){return ZN.has(qn(e))?"y":"x"}function Nf(e){return _f(kn(e))}function e2(e,t,r){r===void 0&&(r=!1);const s=ms(e),a=Nf(e),l=Rf(a);let u=a==="x"?s===(r?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(u=Cl(u)),[u,Cl(u)]}function t2(e){const t=Cl(e);return[Vd(e),t,Vd(t)]}function Vd(e){return e.replace(/start|end/g,t=>JN[t])}const ny=["left","right"],ry=["right","left"],n2=["top","bottom"],r2=["bottom","top"];function o2(e,t,r){switch(e){case"top":case"bottom":return r?t?ry:ny:t?ny:ry;case"left":case"right":return t?n2:r2;default:return[]}}function s2(e,t,r,s){const a=ms(e);let l=o2(qn(e),r==="start",s);return a&&(l=l.map(u=>u+"-"+a),t&&(l=l.concat(l.map(Vd)))),l}function Cl(e){return e.replace(/left|right|bottom|top/g,t=>GN[t])}function i2(e){return{top:0,right:0,bottom:0,left:0,...e}}function m0(e){return typeof e!="number"?i2(e):{top:e,right:e,bottom:e,left:e}}function kl(e){const{x:t,y:r,width:s,height:a}=e;return{width:s,height:a,top:r,left:t,right:t+s,bottom:r+a,x:t,y:r}}function oy(e,t,r){let{reference:s,floating:a}=e;const l=kn(t),u=Nf(t),d=Rf(u),h=qn(t),m=l==="y",g=s.x+s.width/2-a.width/2,y=s.y+s.height/2-a.height/2,C=s[d]/2-a[d]/2;let k;switch(h){case"top":k={x:g,y:s.y-a.height};break;case"bottom":k={x:g,y:s.y+s.height};break;case"right":k={x:s.x+s.width,y};break;case"left":k={x:s.x-a.width,y};break;default:k={x:s.x,y:s.y}}switch(ms(t)){case"start":k[u]-=C*(r&&m?-1:1);break;case"end":k[u]+=C*(r&&m?-1:1);break}return k}async function a2(e,t){var r;t===void 0&&(t={});const{x:s,y:a,platform:l,rects:u,elements:d,strategy:h}=e,{boundary:m="clippingAncestors",rootBoundary:g="viewport",elementContext:y="floating",altBoundary:C=!1,padding:k=0}=Wn(t,e),E=m0(k),S=d[C?y==="floating"?"reference":"floating":y],R=kl(await l.getClippingRect({element:(r=await(l.isElement==null?void 0:l.isElement(S)))==null||r?S:S.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(d.floating)),boundary:m,rootBoundary:g,strategy:h})),P=y==="floating"?{x:s,y:a,width:u.floating.width,height:u.floating.height}:u.reference,N=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d.floating)),A=await(l.isElement==null?void 0:l.isElement(N))?await(l.getScale==null?void 0:l.getScale(N))||{x:1,y:1}:{x:1,y:1},D=kl(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:P,offsetParent:N,strategy:h}):P);return{top:(R.top-D.top+E.top)/A.y,bottom:(D.bottom-R.bottom+E.bottom)/A.y,left:(R.left-D.left+E.left)/A.x,right:(D.right-R.right+E.right)/A.x}}const l2=async(e,t,r)=>{const{placement:s="bottom",strategy:a="absolute",middleware:l=[],platform:u}=r,d=l.filter(Boolean),h=await(u.isRTL==null?void 0:u.isRTL(t));let m=await u.getElementRects({reference:e,floating:t,strategy:a}),{x:g,y}=oy(m,s,h),C=s,k={},E=0;for(let S=0;S({name:"arrow",options:e,async fn(t){const{x:r,y:s,placement:a,rects:l,platform:u,elements:d,middlewareData:h}=t,{element:m,padding:g=0}=Wn(e,t)||{};if(m==null)return{};const y=m0(g),C={x:r,y:s},k=Nf(a),E=Rf(k),v=await u.getDimensions(m),S=k==="y",R=S?"top":"left",P=S?"bottom":"right",N=S?"clientHeight":"clientWidth",A=l.reference[E]+l.reference[k]-C[k]-l.floating[E],D=C[k]-l.reference[k],V=await(u.getOffsetParent==null?void 0:u.getOffsetParent(m));let H=V?V[N]:0;(!H||!await(u.isElement==null?void 0:u.isElement(V)))&&(H=d.floating[N]||l.floating[E]);const U=A/2-D/2,X=H/2-v[E]/2-1,re=Or(y[R],X),ee=Or(y[P],X),he=re,ve=H-v[E]-ee,ue=H/2-v[E]/2+U,Ee=$d(he,ue,ve),J=!h.arrow&&ms(a)!=null&&ue!==Ee&&l.reference[E]/2-(ueue<=0)){var ee,he;const ue=(((ee=l.flip)==null?void 0:ee.index)||0)+1,Ee=H[ue];if(Ee&&(!(y==="alignment"?P!==kn(Ee):!1)||re.every($=>kn($.placement)===P?$.overflows[0]>0:!0)))return{data:{index:ue,overflows:re},reset:{placement:Ee}};let J=(he=re.filter(se=>se.overflows[0]<=0).sort((se,$)=>se.overflows[1]-$.overflows[1])[0])==null?void 0:he.placement;if(!J)switch(k){case"bestFit":{var ve;const se=(ve=re.filter($=>{if(V){const G=kn($.placement);return G===P||G==="y"}return!0}).map($=>[$.placement,$.overflows.filter(G=>G>0).reduce((G,z)=>G+z,0)]).sort(($,G)=>$[1]-G[1])[0])==null?void 0:ve[0];se&&(J=se);break}case"initialPlacement":J=d;break}if(a!==J)return{reset:{placement:J}}}return{}}}};function sy(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function iy(e){return XN.some(t=>e[t]>=0)}const d2=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:s}=t,{strategy:a="referenceHidden",...l}=Wn(e,t);switch(a){case"referenceHidden":{const u=await s.detectOverflow(t,{...l,elementContext:"reference"}),d=sy(u,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:iy(d)}}}case"escaped":{const u=await s.detectOverflow(t,{...l,altBoundary:!0}),d=sy(u,r.floating);return{data:{escapedOffsets:d,escaped:iy(d)}}}default:return{}}}}},g0=new Set(["left","top"]);async function f2(e,t){const{placement:r,platform:s,elements:a}=e,l=await(s.isRTL==null?void 0:s.isRTL(a.floating)),u=qn(r),d=ms(r),h=kn(r)==="y",m=g0.has(u)?-1:1,g=l&&h?-1:1,y=Wn(t,e);let{mainAxis:C,crossAxis:k,alignmentAxis:E}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return d&&typeof E=="number"&&(k=d==="end"?E*-1:E),h?{x:k*g,y:C*m}:{x:C*m,y:k*g}}const h2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,s;const{x:a,y:l,placement:u,middlewareData:d}=t,h=await f2(t,e);return u===((r=d.offset)==null?void 0:r.placement)&&(s=d.arrow)!=null&&s.alignmentOffset?{}:{x:a+h.x,y:l+h.y,data:{...h,placement:u}}}}},p2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:s,placement:a,platform:l}=t,{mainAxis:u=!0,crossAxis:d=!1,limiter:h={fn:R=>{let{x:P,y:N}=R;return{x:P,y:N}}},...m}=Wn(e,t),g={x:r,y:s},y=await l.detectOverflow(t,m),C=kn(qn(a)),k=_f(C);let E=g[k],v=g[C];if(u){const R=k==="y"?"top":"left",P=k==="y"?"bottom":"right",N=E+y[R],A=E-y[P];E=$d(N,E,A)}if(d){const R=C==="y"?"top":"left",P=C==="y"?"bottom":"right",N=v+y[R],A=v-y[P];v=$d(N,v,A)}const S=h.fn({...t,[k]:E,[C]:v});return{...S,data:{x:S.x-r,y:S.y-s,enabled:{[k]:u,[C]:d}}}}}},m2=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:s,placement:a,rects:l,middlewareData:u}=t,{offset:d=0,mainAxis:h=!0,crossAxis:m=!0}=Wn(e,t),g={x:r,y:s},y=kn(a),C=_f(y);let k=g[C],E=g[y];const v=Wn(d,t),S=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(h){const N=C==="y"?"height":"width",A=l.reference[C]-l.floating[N]+S.mainAxis,D=l.reference[C]+l.reference[N]-S.mainAxis;kD&&(k=D)}if(m){var R,P;const N=C==="y"?"width":"height",A=g0.has(qn(a)),D=l.reference[y]-l.floating[N]+(A&&((R=u.offset)==null?void 0:R[y])||0)+(A?0:S.crossAxis),V=l.reference[y]+l.reference[N]+(A?0:((P=u.offset)==null?void 0:P[y])||0)-(A?S.crossAxis:0);EV&&(E=V)}return{[C]:k,[y]:E}}}},g2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,s;const{placement:a,rects:l,platform:u,elements:d}=t,{apply:h=()=>{},...m}=Wn(e,t),g=await u.detectOverflow(t,m),y=qn(a),C=ms(a),k=kn(a)==="y",{width:E,height:v}=l.floating;let S,R;y==="top"||y==="bottom"?(S=y,R=C===(await(u.isRTL==null?void 0:u.isRTL(d.floating))?"start":"end")?"left":"right"):(R=y,S=C==="end"?"top":"bottom");const P=v-g.top-g.bottom,N=E-g.left-g.right,A=Or(v-g[S],P),D=Or(E-g[R],N),V=!t.middlewareData.shift;let H=A,U=D;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(U=N),(s=t.middlewareData.shift)!=null&&s.enabled.y&&(H=P),V&&!C){const re=$t(g.left,0),ee=$t(g.right,0),he=$t(g.top,0),ve=$t(g.bottom,0);k?U=E-2*(re!==0||ee!==0?re+ee:$t(g.left,g.right)):H=v-2*(he!==0||ve!==0?he+ve:$t(g.top,g.bottom))}await h({...t,availableWidth:U,availableHeight:H});const X=await u.getDimensions(d.floating);return E!==X.width||v!==X.height?{reset:{rects:!0}}:{}}}};function Ul(){return typeof window<"u"}function gs(e){return y0(e)?(e.nodeName||"").toLowerCase():"#document"}function Vt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Tn(e){var t;return(t=(y0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function y0(e){return Ul()?e instanceof Node||e instanceof Vt(e).Node:!1}function hn(e){return Ul()?e instanceof Element||e instanceof Vt(e).Element:!1}function Pn(e){return Ul()?e instanceof HTMLElement||e instanceof Vt(e).HTMLElement:!1}function ay(e){return!Ul()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Vt(e).ShadowRoot}const y2=new Set(["inline","contents"]);function Mi(e){const{overflow:t,overflowX:r,overflowY:s,display:a}=pn(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+r)&&!y2.has(a)}const v2=new Set(["table","td","th"]);function w2(e){return v2.has(gs(e))}const x2=[":popover-open",":modal"];function Bl(e){return x2.some(t=>{try{return e.matches(t)}catch{return!1}})}const b2=["transform","translate","scale","rotate","perspective"],S2=["transform","translate","scale","rotate","perspective","filter"],E2=["paint","layout","strict","content"];function Pf(e){const t=Tf(),r=hn(e)?pn(e):e;return b2.some(s=>r[s]?r[s]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||S2.some(s=>(r.willChange||"").includes(s))||E2.some(s=>(r.contain||"").includes(s))}function C2(e){let t=jr(e);for(;Pn(t)&&!ds(t);){if(Pf(t))return t;if(Bl(t))return null;t=jr(t)}return null}function Tf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const k2=new Set(["html","body","#document"]);function ds(e){return k2.has(gs(e))}function pn(e){return Vt(e).getComputedStyle(e)}function zl(e){return hn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function jr(e){if(gs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ay(e)&&e.host||Tn(e);return ay(t)?t.host:t}function v0(e){const t=jr(e);return ds(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pn(t)&&Mi(t)?t:v0(t)}function xi(e,t,r){var s;t===void 0&&(t=[]),r===void 0&&(r=!0);const a=v0(e),l=a===((s=e.ownerDocument)==null?void 0:s.body),u=Vt(a);if(l){const d=Hd(u);return t.concat(u,u.visualViewport||[],Mi(a)?a:[],d&&r?xi(d):[])}return t.concat(a,xi(a,[],r))}function Hd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function w0(e){const t=pn(e);let r=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const a=Pn(e),l=a?e.offsetWidth:r,u=a?e.offsetHeight:s,d=El(r)!==l||El(s)!==u;return d&&(r=l,s=u),{width:r,height:s,$:d}}function Af(e){return hn(e)?e:e.contextElement}function Xo(e){const t=Af(e);if(!Pn(t))return Rn(1);const r=t.getBoundingClientRect(),{width:s,height:a,$:l}=w0(t);let u=(l?El(r.width):r.width)/s,d=(l?El(r.height):r.height)/a;return(!u||!Number.isFinite(u))&&(u=1),(!d||!Number.isFinite(d))&&(d=1),{x:u,y:d}}const _2=Rn(0);function x0(e){const t=Vt(e);return!Tf()||!t.visualViewport?_2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function R2(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Vt(e)?!1:t}function po(e,t,r,s){t===void 0&&(t=!1),r===void 0&&(r=!1);const a=e.getBoundingClientRect(),l=Af(e);let u=Rn(1);t&&(s?hn(s)&&(u=Xo(s)):u=Xo(e));const d=R2(l,r,s)?x0(l):Rn(0);let h=(a.left+d.x)/u.x,m=(a.top+d.y)/u.y,g=a.width/u.x,y=a.height/u.y;if(l){const C=Vt(l),k=s&&hn(s)?Vt(s):s;let E=C,v=Hd(E);for(;v&&s&&k!==E;){const S=Xo(v),R=v.getBoundingClientRect(),P=pn(v),N=R.left+(v.clientLeft+parseFloat(P.paddingLeft))*S.x,A=R.top+(v.clientTop+parseFloat(P.paddingTop))*S.y;h*=S.x,m*=S.y,g*=S.x,y*=S.y,h+=N,m+=A,E=Vt(v),v=Hd(E)}}return kl({width:g,height:y,x:h,y:m})}function $l(e,t){const r=zl(e).scrollLeft;return t?t.left+r:po(Tn(e)).left+r}function b0(e,t){const r=e.getBoundingClientRect(),s=r.left+t.scrollLeft-$l(e,r),a=r.top+t.scrollTop;return{x:s,y:a}}function N2(e){let{elements:t,rect:r,offsetParent:s,strategy:a}=e;const l=a==="fixed",u=Tn(s),d=t?Bl(t.floating):!1;if(s===u||d&&l)return r;let h={scrollLeft:0,scrollTop:0},m=Rn(1);const g=Rn(0),y=Pn(s);if((y||!y&&!l)&&((gs(s)!=="body"||Mi(u))&&(h=zl(s)),Pn(s))){const k=po(s);m=Xo(s),g.x=k.x+s.clientLeft,g.y=k.y+s.clientTop}const C=u&&!y&&!l?b0(u,h):Rn(0);return{width:r.width*m.x,height:r.height*m.y,x:r.x*m.x-h.scrollLeft*m.x+g.x+C.x,y:r.y*m.y-h.scrollTop*m.y+g.y+C.y}}function P2(e){return Array.from(e.getClientRects())}function T2(e){const t=Tn(e),r=zl(e),s=e.ownerDocument.body,a=$t(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),l=$t(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let u=-r.scrollLeft+$l(e);const d=-r.scrollTop;return pn(s).direction==="rtl"&&(u+=$t(t.clientWidth,s.clientWidth)-a),{width:a,height:l,x:u,y:d}}const ly=25;function A2(e,t){const r=Vt(e),s=Tn(e),a=r.visualViewport;let l=s.clientWidth,u=s.clientHeight,d=0,h=0;if(a){l=a.width,u=a.height;const g=Tf();(!g||g&&t==="fixed")&&(d=a.offsetLeft,h=a.offsetTop)}const m=$l(s);if(m<=0){const g=s.ownerDocument,y=g.body,C=getComputedStyle(y),k=g.compatMode==="CSS1Compat"&&parseFloat(C.marginLeft)+parseFloat(C.marginRight)||0,E=Math.abs(s.clientWidth-y.clientWidth-k);E<=ly&&(l-=E)}else m<=ly&&(l+=m);return{width:l,height:u,x:d,y:h}}const O2=new Set(["absolute","fixed"]);function j2(e,t){const r=po(e,!0,t==="fixed"),s=r.top+e.clientTop,a=r.left+e.clientLeft,l=Pn(e)?Xo(e):Rn(1),u=e.clientWidth*l.x,d=e.clientHeight*l.y,h=a*l.x,m=s*l.y;return{width:u,height:d,x:h,y:m}}function cy(e,t,r){let s;if(t==="viewport")s=A2(e,r);else if(t==="document")s=T2(Tn(e));else if(hn(t))s=j2(t,r);else{const a=x0(e);s={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return kl(s)}function S0(e,t){const r=jr(e);return r===t||!hn(r)||ds(r)?!1:pn(r).position==="fixed"||S0(r,t)}function L2(e,t){const r=t.get(e);if(r)return r;let s=xi(e,[],!1).filter(d=>hn(d)&&gs(d)!=="body"),a=null;const l=pn(e).position==="fixed";let u=l?jr(e):e;for(;hn(u)&&!ds(u);){const d=pn(u),h=Pf(u);!h&&d.position==="fixed"&&(a=null),(l?!h&&!a:!h&&d.position==="static"&&!!a&&O2.has(a.position)||Mi(u)&&!h&&S0(e,u))?s=s.filter(g=>g!==u):a=d,u=jr(u)}return t.set(e,s),s}function I2(e){let{element:t,boundary:r,rootBoundary:s,strategy:a}=e;const u=[...r==="clippingAncestors"?Bl(t)?[]:L2(t,this._c):[].concat(r),s],d=u[0],h=u.reduce((m,g)=>{const y=cy(t,g,a);return m.top=$t(y.top,m.top),m.right=Or(y.right,m.right),m.bottom=Or(y.bottom,m.bottom),m.left=$t(y.left,m.left),m},cy(t,d,a));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}}function M2(e){const{width:t,height:r}=w0(e);return{width:t,height:r}}function D2(e,t,r){const s=Pn(t),a=Tn(t),l=r==="fixed",u=po(e,!0,l,t);let d={scrollLeft:0,scrollTop:0};const h=Rn(0);function m(){h.x=$l(a)}if(s||!s&&!l)if((gs(t)!=="body"||Mi(a))&&(d=zl(t)),s){const k=po(t,!0,l,t);h.x=k.x+t.clientLeft,h.y=k.y+t.clientTop}else a&&m();l&&!s&&a&&m();const g=a&&!s&&!l?b0(a,d):Rn(0),y=u.left+d.scrollLeft-h.x-g.x,C=u.top+d.scrollTop-h.y-g.y;return{x:y,y:C,width:u.width,height:u.height}}function id(e){return pn(e).position==="static"}function uy(e,t){if(!Pn(e)||pn(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Tn(e)===r&&(r=r.ownerDocument.body),r}function E0(e,t){const r=Vt(e);if(Bl(e))return r;if(!Pn(e)){let a=jr(e);for(;a&&!ds(a);){if(hn(a)&&!id(a))return a;a=jr(a)}return r}let s=uy(e,t);for(;s&&w2(s)&&id(s);)s=uy(s,t);return s&&ds(s)&&id(s)&&!Pf(s)?r:s||C2(e)||r}const F2=async function(e){const t=this.getOffsetParent||E0,r=this.getDimensions,s=await r(e.floating);return{reference:D2(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function U2(e){return pn(e).direction==="rtl"}const B2={convertOffsetParentRelativeRectToViewportRelativeRect:N2,getDocumentElement:Tn,getClippingRect:I2,getOffsetParent:E0,getElementRects:F2,getClientRects:P2,getDimensions:M2,getScale:Xo,isElement:hn,isRTL:U2};function C0(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function z2(e,t){let r=null,s;const a=Tn(e);function l(){var d;clearTimeout(s),(d=r)==null||d.disconnect(),r=null}function u(d,h){d===void 0&&(d=!1),h===void 0&&(h=1),l();const m=e.getBoundingClientRect(),{left:g,top:y,width:C,height:k}=m;if(d||t(),!C||!k)return;const E=el(y),v=el(a.clientWidth-(g+C)),S=el(a.clientHeight-(y+k)),R=el(g),N={rootMargin:-E+"px "+-v+"px "+-S+"px "+-R+"px",threshold:$t(0,Or(1,h))||1};let A=!0;function D(V){const H=V[0].intersectionRatio;if(H!==h){if(!A)return u();H?u(!1,H):s=setTimeout(()=>{u(!1,1e-7)},1e3)}H===1&&!C0(m,e.getBoundingClientRect())&&u(),A=!1}try{r=new IntersectionObserver(D,{...N,root:a.ownerDocument})}catch{r=new IntersectionObserver(D,N)}r.observe(e)}return u(!0),l}function $2(e,t,r,s){s===void 0&&(s={});const{ancestorScroll:a=!0,ancestorResize:l=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:h=!1}=s,m=Af(e),g=a||l?[...m?xi(m):[],...xi(t)]:[];g.forEach(R=>{a&&R.addEventListener("scroll",r,{passive:!0}),l&&R.addEventListener("resize",r)});const y=m&&d?z2(m,r):null;let C=-1,k=null;u&&(k=new ResizeObserver(R=>{let[P]=R;P&&P.target===m&&k&&(k.unobserve(t),cancelAnimationFrame(C),C=requestAnimationFrame(()=>{var N;(N=k)==null||N.observe(t)})),r()}),m&&!h&&k.observe(m),k.observe(t));let E,v=h?po(e):null;h&&S();function S(){const R=po(e);v&&!C0(v,R)&&r(),v=R,E=requestAnimationFrame(S)}return r(),()=>{var R;g.forEach(P=>{a&&P.removeEventListener("scroll",r),l&&P.removeEventListener("resize",r)}),y==null||y(),(R=k)==null||R.disconnect(),k=null,h&&cancelAnimationFrame(E)}}const V2=h2,H2=p2,W2=u2,q2=g2,K2=d2,dy=c2,Q2=m2,Y2=(e,t,r)=>{const s=new Map,a={platform:B2,...r},l={...a.platform,_c:s};return l2(e,t,{...a,platform:l})};var X2=typeof document<"u",G2=function(){},gl=X2?x.useLayoutEffect:G2;function _l(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,s,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(s=r;s--!==0;)if(!_l(e[s],t[s]))return!1;return!0}if(a=Object.keys(e),r=a.length,r!==Object.keys(t).length)return!1;for(s=r;s--!==0;)if(!{}.hasOwnProperty.call(t,a[s]))return!1;for(s=r;s--!==0;){const l=a[s];if(!(l==="_owner"&&e.$$typeof)&&!_l(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function k0(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function fy(e,t){const r=k0(e);return Math.round(t*r)/r}function ad(e){const t=x.useRef(e);return gl(()=>{t.current=e}),t}function J2(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:s=[],platform:a,elements:{reference:l,floating:u}={},transform:d=!0,whileElementsMounted:h,open:m}=e,[g,y]=x.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[C,k]=x.useState(s);_l(C,s)||k(s);const[E,v]=x.useState(null),[S,R]=x.useState(null),P=x.useCallback($=>{$!==V.current&&(V.current=$,v($))},[]),N=x.useCallback($=>{$!==H.current&&(H.current=$,R($))},[]),A=l||E,D=u||S,V=x.useRef(null),H=x.useRef(null),U=x.useRef(g),X=h!=null,re=ad(h),ee=ad(a),he=ad(m),ve=x.useCallback(()=>{if(!V.current||!H.current)return;const $={placement:t,strategy:r,middleware:C};ee.current&&($.platform=ee.current),Y2(V.current,H.current,$).then(G=>{const z={...G,isPositioned:he.current!==!1};ue.current&&!_l(U.current,z)&&(U.current=z,Ri.flushSync(()=>{y(z)}))})},[C,t,r,ee,he]);gl(()=>{m===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,y($=>({...$,isPositioned:!1})))},[m]);const ue=x.useRef(!1);gl(()=>(ue.current=!0,()=>{ue.current=!1}),[]),gl(()=>{if(A&&(V.current=A),D&&(H.current=D),A&&D){if(re.current)return re.current(A,D,ve);ve()}},[A,D,ve,re,X]);const Ee=x.useMemo(()=>({reference:V,floating:H,setReference:P,setFloating:N}),[P,N]),J=x.useMemo(()=>({reference:A,floating:D}),[A,D]),se=x.useMemo(()=>{const $={position:r,left:0,top:0};if(!J.floating)return $;const G=fy(J.floating,g.x),z=fy(J.floating,g.y);return d?{...$,transform:"translate("+G+"px, "+z+"px)",...k0(J.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:G,top:z}},[r,d,J.floating,g.x,g.y]);return x.useMemo(()=>({...g,update:ve,refs:Ee,elements:J,floatingStyles:se}),[g,ve,Ee,J,se])}const Z2=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:s,padding:a}=typeof e=="function"?e(r):e;return s&&t(s)?s.current!=null?dy({element:s.current,padding:a}).fn(r):{}:s?dy({element:s,padding:a}).fn(r):{}}}},eP=(e,t)=>({...V2(e),options:[e,t]}),tP=(e,t)=>({...H2(e),options:[e,t]}),nP=(e,t)=>({...Q2(e),options:[e,t]}),rP=(e,t)=>({...W2(e),options:[e,t]}),oP=(e,t)=>({...q2(e),options:[e,t]}),sP=(e,t)=>({...K2(e),options:[e,t]}),iP=(e,t)=>({...Z2(e),options:[e,t]});var aP="Arrow",_0=x.forwardRef((e,t)=>{const{children:r,width:s=10,height:a=5,...l}=e;return b.jsx(He.svg,{...l,ref:t,width:s,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:b.jsx("polygon",{points:"0,0 30,0 15,10"})})});_0.displayName=aP;var lP=_0;function R0(e){const[t,r]=x.useState(void 0);return Et(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const s=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const l=a[0];let u,d;if("borderBoxSize"in l){const h=l.borderBoxSize,m=Array.isArray(h)?h[0]:h;u=m.inlineSize,d=m.blockSize}else u=e.offsetWidth,d=e.offsetHeight;r({width:u,height:d})});return s.observe(e,{box:"border-box"}),()=>s.unobserve(e)}else r(void 0)},[e]),t}var Of="Popper",[N0,P0]=Fl(Of),[cP,T0]=N0(Of),A0=e=>{const{__scopePopper:t,children:r}=e,[s,a]=x.useState(null);return b.jsx(cP,{scope:t,anchor:s,onAnchorChange:a,children:r})};A0.displayName=Of;var O0="PopperAnchor",j0=x.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:s,...a}=e,l=T0(O0,r),u=x.useRef(null),d=rt(t,u),h=x.useRef(null);return x.useEffect(()=>{const m=h.current;h.current=(s==null?void 0:s.current)||u.current,m!==h.current&&l.onAnchorChange(h.current)}),s?null:b.jsx(He.div,{...a,ref:d})});j0.displayName=O0;var jf="PopperContent",[uP,dP]=N0(jf),L0=x.forwardRef((e,t)=>{var Z,me,de,_e,Ne,Te;const{__scopePopper:r,side:s="bottom",sideOffset:a=0,align:l="center",alignOffset:u=0,arrowPadding:d=0,avoidCollisions:h=!0,collisionBoundary:m=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:C=!1,updatePositionStrategy:k="optimized",onPlaced:E,...v}=e,S=T0(jf,r),[R,P]=x.useState(null),N=rt(t,Ke=>P(Ke)),[A,D]=x.useState(null),V=R0(A),H=(V==null?void 0:V.width)??0,U=(V==null?void 0:V.height)??0,X=s+(l!=="center"?"-"+l:""),re=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},ee=Array.isArray(m)?m:[m],he=ee.length>0,ve={padding:re,boundary:ee.filter(hP),altBoundary:he},{refs:ue,floatingStyles:Ee,placement:J,isPositioned:se,middlewareData:$}=J2({strategy:"fixed",placement:X,whileElementsMounted:(...Ke)=>$2(...Ke,{animationFrame:k==="always"}),elements:{reference:S.anchor},middleware:[eP({mainAxis:a+U,alignmentAxis:u}),h&&tP({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?nP():void 0,...ve}),h&&rP({...ve}),oP({...ve,apply:({elements:Ke,rects:ot,availableWidth:Kn,availableHeight:Qn})=>{const{width:An,height:Di}=ot.reference,Yn=Ke.floating.style;Yn.setProperty("--radix-popper-available-width",`${Kn}px`),Yn.setProperty("--radix-popper-available-height",`${Qn}px`),Yn.setProperty("--radix-popper-anchor-width",`${An}px`),Yn.setProperty("--radix-popper-anchor-height",`${Di}px`)}}),A&&iP({element:A,padding:d}),pP({arrowWidth:H,arrowHeight:U}),C&&sP({strategy:"referenceHidden",...ve})]}),[G,z]=D0(J),L=ho(E);Et(()=>{se&&(L==null||L())},[se,L]);const W=(Z=$.arrow)==null?void 0:Z.x,we=(me=$.arrow)==null?void 0:me.y,ye=((de=$.arrow)==null?void 0:de.centerOffset)!==0,[pe,ge]=x.useState();return Et(()=>{R&&ge(window.getComputedStyle(R).zIndex)},[R]),b.jsx("div",{ref:ue.setFloating,"data-radix-popper-content-wrapper":"",style:{...Ee,transform:se?Ee.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:pe,"--radix-popper-transform-origin":[(_e=$.transformOrigin)==null?void 0:_e.x,(Ne=$.transformOrigin)==null?void 0:Ne.y].join(" "),...((Te=$.hide)==null?void 0:Te.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:b.jsx(uP,{scope:r,placedSide:G,onArrowChange:D,arrowX:W,arrowY:we,shouldHideArrow:ye,children:b.jsx(He.div,{"data-side":G,"data-align":z,...v,ref:N,style:{...v.style,animation:se?void 0:"none"}})})})});L0.displayName=jf;var I0="PopperArrow",fP={top:"bottom",right:"left",bottom:"top",left:"right"},M0=x.forwardRef(function(t,r){const{__scopePopper:s,...a}=t,l=dP(I0,s),u=fP[l.placedSide];return b.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:b.jsx(lP,{...a,ref:r,style:{...a.style,display:"block"}})})});M0.displayName=I0;function hP(e){return e!==null}var pP=e=>({name:"transformOrigin",options:e,fn(t){var S,R,P;const{placement:r,rects:s,middlewareData:a}=t,u=((S=a.arrow)==null?void 0:S.centerOffset)!==0,d=u?0:e.arrowWidth,h=u?0:e.arrowHeight,[m,g]=D0(r),y={start:"0%",center:"50%",end:"100%"}[g],C=(((R=a.arrow)==null?void 0:R.x)??0)+d/2,k=(((P=a.arrow)==null?void 0:P.y)??0)+h/2;let E="",v="";return m==="bottom"?(E=u?y:`${C}px`,v=`${-h}px`):m==="top"?(E=u?y:`${C}px`,v=`${s.floating.height+h}px`):m==="right"?(E=`${-h}px`,v=u?y:`${k}px`):m==="left"&&(E=`${s.floating.width+h}px`,v=u?y:`${k}px`),{data:{x:E,y:v}}}});function D0(e){const[t,r="center"]=e.split("-");return[t,r]}var mP=A0,gP=j0,yP=L0,vP=M0,wP="Portal",F0=x.forwardRef((e,t)=>{var d;const{container:r,...s}=e,[a,l]=x.useState(!1);Et(()=>l(!0),[]);const u=r||a&&((d=globalThis==null?void 0:globalThis.document)==null?void 0:d.body);return u?KE.createPortal(b.jsx(He.div,{...s,ref:t}),u):null});F0.displayName=wP;function xP(e){const t=bP(e),r=x.forwardRef((s,a)=>{const{children:l,...u}=s,d=x.Children.toArray(l),h=d.find(EP);if(h){const m=h.props.children,g=d.map(y=>y===h?x.Children.count(m)>1?x.Children.only(null):x.isValidElement(m)?m.props.children:null:y);return b.jsx(t,{...u,ref:a,children:x.isValidElement(m)?x.cloneElement(m,void 0,g):null})}return b.jsx(t,{...u,ref:a,children:l})});return r.displayName=`${e}.Slot`,r}function bP(e){const t=x.forwardRef((r,s)=>{const{children:a,...l}=r;if(x.isValidElement(a)){const u=kP(a),d=CP(l,a.props);return a.type!==x.Fragment&&(d.ref=s?Ii(s,u):u),x.cloneElement(a,d)}return x.Children.count(a)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var SP=Symbol("radix.slottable");function EP(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===SP}function CP(e,t){const r={...t};for(const s in t){const a=e[s],l=t[s];/^on[A-Z]/.test(s)?a&&l?r[s]=(...d)=>{const h=l(...d);return a(...d),h}:a&&(r[s]=a):s==="style"?r[s]={...a,...l}:s==="className"&&(r[s]=[a,l].filter(Boolean).join(" "))}return{...e,...r}}function kP(e){var s,a;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var _P=Pl[" useInsertionEffect ".trim().toString()]||Et;function Wd({prop:e,defaultProp:t,onChange:r=()=>{},caller:s}){const[a,l,u]=RP({defaultProp:t,onChange:r}),d=e!==void 0,h=d?e:a;{const g=x.useRef(e!==void 0);x.useEffect(()=>{const y=g.current;y!==d&&console.warn(`${s} is changing from ${y?"controlled":"uncontrolled"} to ${d?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=d},[d,s])}const m=x.useCallback(g=>{var y;if(d){const C=NP(g)?g(e):g;C!==e&&((y=u.current)==null||y.call(u,C))}else l(g)},[d,e,l,u]);return[h,m]}function RP({defaultProp:e,onChange:t}){const[r,s]=x.useState(e),a=x.useRef(r),l=x.useRef(t);return _P(()=>{l.current=t},[t]),x.useEffect(()=>{var u;a.current!==r&&((u=l.current)==null||u.call(l,r),a.current=r)},[r,a]),[r,s,l]}function NP(e){return typeof e=="function"}function U0(e){const t=x.useRef({value:e,previous:e});return x.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var B0=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),PP="VisuallyHidden",TP=x.forwardRef((e,t)=>b.jsx(He.span,{...e,ref:t,style:{...B0,...e.style}}));TP.displayName=PP;var AP=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},qo=new WeakMap,tl=new WeakMap,nl={},ld=0,z0=function(e){return e&&(e.host||z0(e.parentNode))},OP=function(e,t){return t.map(function(r){if(e.contains(r))return r;var s=z0(r);return s&&e.contains(s)?s:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},jP=function(e,t,r,s){var a=OP(t,Array.isArray(e)?e:[e]);nl[r]||(nl[r]=new WeakMap);var l=nl[r],u=[],d=new Set,h=new Set(a),m=function(y){!y||d.has(y)||(d.add(y),m(y.parentNode))};a.forEach(m);var g=function(y){!y||h.has(y)||Array.prototype.forEach.call(y.children,function(C){if(d.has(C))g(C);else try{var k=C.getAttribute(s),E=k!==null&&k!=="false",v=(qo.get(C)||0)+1,S=(l.get(C)||0)+1;qo.set(C,v),l.set(C,S),u.push(C),v===1&&E&&tl.set(C,!0),S===1&&C.setAttribute(r,"true"),E||C.setAttribute(s,"true")}catch(R){console.error("aria-hidden: cannot operate on ",C,R)}})};return g(t),d.clear(),ld++,function(){u.forEach(function(y){var C=qo.get(y)-1,k=l.get(y)-1;qo.set(y,C),l.set(y,k),C||(tl.has(y)||y.removeAttribute(s),tl.delete(y)),k||y.removeAttribute(r)}),ld--,ld||(qo=new WeakMap,qo=new WeakMap,tl=new WeakMap,nl={})}},LP=function(e,t,r){r===void 0&&(r="data-aria-hidden");var s=Array.from(Array.isArray(e)?e:[e]),a=AP(e);return a?(s.push.apply(s,Array.from(a.querySelectorAll("[aria-live], script"))),jP(s,a,r,"aria-hidden")):function(){return null}},Cn=function(){return Cn=Object.assign||function(t){for(var r,s=1,a=arguments.length;s"u")return GP;var t=JP(e),r=document.documentElement.clientWidth,s=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,s-r+t[2]-t[0])}},eT=W0(),Go="data-scroll-locked",tT=function(e,t,r,s){var a=e.left,l=e.top,u=e.right,d=e.gap;return r===void 0&&(r="margin"),` .`.concat(MP,` { overflow: hidden `).concat(s,`; padding-right: `).concat(d,"px ").concat(s,`; } body[`).concat(Go,`] { overflow: hidden `).concat(s,`; overscroll-behavior: contain; `).concat([t&&"position: relative ".concat(s,";"),r==="margin"&&` padding-left: `.concat(a,`px; padding-top: `).concat(l,`px; padding-right: `).concat(u,`px; margin-left:0; margin-top:0; margin-right: `).concat(d,"px ").concat(s,`; `),r==="padding"&&"padding-right: ".concat(d,"px ").concat(s,";")].filter(Boolean).join(""),` } .`).concat(yl,` { right: `).concat(d,"px ").concat(s,`; } .`).concat(vl,` { margin-right: `).concat(d,"px ").concat(s,`; } .`).concat(yl," .").concat(yl,` { right: 0 `).concat(s,`; } .`).concat(vl," .").concat(vl,` { margin-right: 0 `).concat(s,`; } body[`).concat(Go,`] { `).concat(DP,": ").concat(d,`px; } `)},py=function(){var e=parseInt(document.body.getAttribute(Go)||"0",10);return isFinite(e)?e:0},nT=function(){x.useEffect(function(){return document.body.setAttribute(Go,(py()+1).toString()),function(){var e=py()-1;e<=0?document.body.removeAttribute(Go):document.body.setAttribute(Go,e.toString())}},[])},rT=function(e){var t=e.noRelative,r=e.noImportant,s=e.gapMode,a=s===void 0?"margin":s;nT();var l=x.useMemo(function(){return ZP(a)},[a]);return x.createElement(eT,{styles:tT(l,!t,a,r?"":"!important")})},qd=!1;if(typeof window<"u")try{var rl=Object.defineProperty({},"passive",{get:function(){return qd=!0,!0}});window.addEventListener("test",rl,rl),window.removeEventListener("test",rl,rl)}catch{qd=!1}var Ko=qd?{passive:!1}:!1,oT=function(e){return e.tagName==="TEXTAREA"},q0=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!oT(e)&&r[t]==="visible")},sT=function(e){return q0(e,"overflowY")},iT=function(e){return q0(e,"overflowX")},my=function(e,t){var r=t.ownerDocument,s=t;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var a=K0(e,s);if(a){var l=Q0(e,s),u=l[1],d=l[2];if(u>d)return!0}s=s.parentNode}while(s&&s!==r.body);return!1},aT=function(e){var t=e.scrollTop,r=e.scrollHeight,s=e.clientHeight;return[t,r,s]},lT=function(e){var t=e.scrollLeft,r=e.scrollWidth,s=e.clientWidth;return[t,r,s]},K0=function(e,t){return e==="v"?sT(t):iT(t)},Q0=function(e,t){return e==="v"?aT(t):lT(t)},cT=function(e,t){return e==="h"&&t==="rtl"?-1:1},uT=function(e,t,r,s,a){var l=cT(e,window.getComputedStyle(t).direction),u=l*s,d=r.target,h=t.contains(d),m=!1,g=u>0,y=0,C=0;do{if(!d)break;var k=Q0(e,d),E=k[0],v=k[1],S=k[2],R=v-S-l*E;(E||R)&&K0(e,d)&&(y+=R,C+=E);var P=d.parentNode;d=P&&P.nodeType===Node.DOCUMENT_FRAGMENT_NODE?P.host:P}while(!h&&d!==document.body||h&&(t.contains(d)||t===d));return(g&&Math.abs(y)<1||!g&&Math.abs(C)<1)&&(m=!0),m},ol=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},gy=function(e){return[e.deltaX,e.deltaY]},yy=function(e){return e&&"current"in e?e.current:e},dT=function(e,t){return e[0]===t[0]&&e[1]===t[1]},fT=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} `)},hT=0,Qo=[];function pT(e){var t=x.useRef([]),r=x.useRef([0,0]),s=x.useRef(),a=x.useState(hT++)[0],l=x.useState(W0)[0],u=x.useRef(e);x.useEffect(function(){u.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var v=IP([e.lockRef.current],(e.shards||[]).map(yy),!0).filter(Boolean);return v.forEach(function(S){return S.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),v.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var d=x.useCallback(function(v,S){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!u.current.allowPinchZoom;var R=ol(v),P=r.current,N="deltaX"in v?v.deltaX:P[0]-R[0],A="deltaY"in v?v.deltaY:P[1]-R[1],D,V=v.target,H=Math.abs(N)>Math.abs(A)?"h":"v";if("touches"in v&&H==="h"&&V.type==="range")return!1;var U=window.getSelection(),X=U&&U.anchorNode,re=X?X===V||X.contains(V):!1;if(re)return!1;var ee=my(H,V);if(!ee)return!0;if(ee?D=H:(D=H==="v"?"h":"v",ee=my(H,V)),!ee)return!1;if(!s.current&&"changedTouches"in v&&(N||A)&&(s.current=D),!D)return!0;var he=s.current||D;return uT(he,S,v,he==="h"?N:A)},[]),h=x.useCallback(function(v){var S=v;if(!(!Qo.length||Qo[Qo.length-1]!==l)){var R="deltaY"in S?gy(S):ol(S),P=t.current.filter(function(D){return D.name===S.type&&(D.target===S.target||S.target===D.shadowParent)&&dT(D.delta,R)})[0];if(P&&P.should){S.cancelable&&S.preventDefault();return}if(!P){var N=(u.current.shards||[]).map(yy).filter(Boolean).filter(function(D){return D.contains(S.target)}),A=N.length>0?d(S,N[0]):!u.current.noIsolation;A&&S.cancelable&&S.preventDefault()}}},[]),m=x.useCallback(function(v,S,R,P){var N={name:v,delta:S,target:R,should:P,shadowParent:mT(R)};t.current.push(N),setTimeout(function(){t.current=t.current.filter(function(A){return A!==N})},1)},[]),g=x.useCallback(function(v){r.current=ol(v),s.current=void 0},[]),y=x.useCallback(function(v){m(v.type,gy(v),v.target,d(v,e.lockRef.current))},[]),C=x.useCallback(function(v){m(v.type,ol(v),v.target,d(v,e.lockRef.current))},[]);x.useEffect(function(){return Qo.push(l),e.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:C}),document.addEventListener("wheel",h,Ko),document.addEventListener("touchmove",h,Ko),document.addEventListener("touchstart",g,Ko),function(){Qo=Qo.filter(function(v){return v!==l}),document.removeEventListener("wheel",h,Ko),document.removeEventListener("touchmove",h,Ko),document.removeEventListener("touchstart",g,Ko)}},[]);var k=e.removeScrollBar,E=e.inert;return x.createElement(x.Fragment,null,E?x.createElement(l,{styles:fT(a)}):null,k?x.createElement(rT,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function mT(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const gT=HP(H0,pT);var Y0=x.forwardRef(function(e,t){return x.createElement(Vl,Cn({},e,{ref:t,sideCar:gT}))});Y0.classNames=Vl.classNames;var yT=[" ","Enter","ArrowUp","ArrowDown"],vT=[" ","Enter"],mo="Select",[Hl,Wl,wT]=bN(mo),[ys]=Fl(mo,[wT,P0]),ql=P0(),[xT,Ir]=ys(mo),[bT,ST]=ys(mo),X0=e=>{const{__scopeSelect:t,children:r,open:s,defaultOpen:a,onOpenChange:l,value:u,defaultValue:d,onValueChange:h,dir:m,name:g,autoComplete:y,disabled:C,required:k,form:E}=e,v=ql(t),[S,R]=x.useState(null),[P,N]=x.useState(null),[A,D]=x.useState(!1),V=EN(m),[H,U]=Wd({prop:s,defaultProp:a??!1,onChange:l,caller:mo}),[X,re]=Wd({prop:u,defaultProp:d,onChange:h,caller:mo}),ee=x.useRef(null),he=S?E||!!S.closest("form"):!0,[ve,ue]=x.useState(new Set),Ee=Array.from(ve).map(J=>J.props.value).join(";");return b.jsx(mP,{...v,children:b.jsxs(xT,{required:k,scope:t,trigger:S,onTriggerChange:R,valueNode:P,onValueNodeChange:N,valueNodeHasChildren:A,onValueNodeHasChildrenChange:D,contentId:kf(),value:X,onValueChange:re,open:H,onOpenChange:U,dir:V,triggerPointerDownPosRef:ee,disabled:C,children:[b.jsx(Hl.Provider,{scope:t,children:b.jsx(bT,{scope:e.__scopeSelect,onNativeOptionAdd:x.useCallback(J=>{ue(se=>new Set(se).add(J))},[]),onNativeOptionRemove:x.useCallback(J=>{ue(se=>{const $=new Set(se);return $.delete(J),$})},[]),children:r})}),he?b.jsxs(xw,{"aria-hidden":!0,required:k,tabIndex:-1,name:g,autoComplete:y,value:X,onChange:J=>re(J.target.value),disabled:C,form:E,children:[X===void 0?b.jsx("option",{value:""}):null,Array.from(ve)]},Ee):null]})})};X0.displayName=mo;var G0="SelectTrigger",J0=x.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:s=!1,...a}=e,l=ql(r),u=Ir(G0,r),d=u.disabled||s,h=rt(t,u.onTriggerChange),m=Wl(r),g=x.useRef("touch"),[y,C,k]=Sw(v=>{const S=m().filter(N=>!N.disabled),R=S.find(N=>N.value===u.value),P=Ew(S,v,R);P!==void 0&&u.onValueChange(P.value)}),E=v=>{d||(u.onOpenChange(!0),k()),v&&(u.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return b.jsx(gP,{asChild:!0,...l,children:b.jsx(He.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:d,"data-disabled":d?"":void 0,"data-placeholder":bw(u.value)?"":void 0,...a,ref:h,onClick:Xe(a.onClick,v=>{v.currentTarget.focus(),g.current!=="mouse"&&E(v)}),onPointerDown:Xe(a.onPointerDown,v=>{g.current=v.pointerType;const S=v.target;S.hasPointerCapture(v.pointerId)&&S.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(E(v),v.preventDefault())}),onKeyDown:Xe(a.onKeyDown,v=>{const S=y.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&C(v.key),!(S&&v.key===" ")&&yT.includes(v.key)&&(E(),v.preventDefault())})})})});J0.displayName=G0;var Z0="SelectValue",ew=x.forwardRef((e,t)=>{const{__scopeSelect:r,className:s,style:a,children:l,placeholder:u="",...d}=e,h=Ir(Z0,r),{onValueNodeHasChildrenChange:m}=h,g=l!==void 0,y=rt(t,h.onValueNodeChange);return Et(()=>{m(g)},[m,g]),b.jsx(He.span,{...d,ref:y,style:{pointerEvents:"none"},children:bw(h.value)?b.jsx(b.Fragment,{children:u}):l})});ew.displayName=Z0;var ET="SelectIcon",tw=x.forwardRef((e,t)=>{const{__scopeSelect:r,children:s,...a}=e;return b.jsx(He.span,{"aria-hidden":!0,...a,ref:t,children:s||"▼"})});tw.displayName=ET;var CT="SelectPortal",nw=e=>b.jsx(F0,{asChild:!0,...e});nw.displayName=CT;var go="SelectContent",rw=x.forwardRef((e,t)=>{const r=Ir(go,e.__scopeSelect),[s,a]=x.useState();if(Et(()=>{a(new DocumentFragment)},[]),!r.open){const l=s;return l?Ri.createPortal(b.jsx(ow,{scope:e.__scopeSelect,children:b.jsx(Hl.Slot,{scope:e.__scopeSelect,children:b.jsx("div",{children:e.children})})}),l):null}return b.jsx(sw,{...e,ref:t})});rw.displayName=go;var cn=10,[ow,Mr]=ys(go),kT="SelectContentImpl",_T=xP("SelectContent.RemoveScroll"),sw=x.forwardRef((e,t)=>{const{__scopeSelect:r,position:s="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:l,onPointerDownOutside:u,side:d,sideOffset:h,align:m,alignOffset:g,arrowPadding:y,collisionBoundary:C,collisionPadding:k,sticky:E,hideWhenDetached:v,avoidCollisions:S,...R}=e,P=Ir(go,r),[N,A]=x.useState(null),[D,V]=x.useState(null),H=rt(t,Z=>A(Z)),[U,X]=x.useState(null),[re,ee]=x.useState(null),he=Wl(r),[ve,ue]=x.useState(!1),Ee=x.useRef(!1);x.useEffect(()=>{if(N)return LP(N)},[N]),BN();const J=x.useCallback(Z=>{const[me,...de]=he().map(Te=>Te.ref.current),[_e]=de.slice(-1),Ne=document.activeElement;for(const Te of Z)if(Te===Ne||(Te==null||Te.scrollIntoView({block:"nearest"}),Te===me&&D&&(D.scrollTop=0),Te===_e&&D&&(D.scrollTop=D.scrollHeight),Te==null||Te.focus(),document.activeElement!==Ne))return},[he,D]),se=x.useCallback(()=>J([U,N]),[J,U,N]);x.useEffect(()=>{ve&&se()},[ve,se]);const{onOpenChange:$,triggerPointerDownPosRef:G}=P;x.useEffect(()=>{if(N){let Z={x:0,y:0};const me=_e=>{var Ne,Te;Z={x:Math.abs(Math.round(_e.pageX)-(((Ne=G.current)==null?void 0:Ne.x)??0)),y:Math.abs(Math.round(_e.pageY)-(((Te=G.current)==null?void 0:Te.y)??0))}},de=_e=>{Z.x<=10&&Z.y<=10?_e.preventDefault():N.contains(_e.target)||$(!1),document.removeEventListener("pointermove",me),G.current=null};return G.current!==null&&(document.addEventListener("pointermove",me),document.addEventListener("pointerup",de,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",me),document.removeEventListener("pointerup",de,{capture:!0})}}},[N,$,G]),x.useEffect(()=>{const Z=()=>$(!1);return window.addEventListener("blur",Z),window.addEventListener("resize",Z),()=>{window.removeEventListener("blur",Z),window.removeEventListener("resize",Z)}},[$]);const[z,L]=Sw(Z=>{const me=he().filter(Ne=>!Ne.disabled),de=me.find(Ne=>Ne.ref.current===document.activeElement),_e=Ew(me,Z,de);_e&&setTimeout(()=>_e.ref.current.focus())}),W=x.useCallback((Z,me,de)=>{const _e=!Ee.current&&!de;(P.value!==void 0&&P.value===me||_e)&&(X(Z),_e&&(Ee.current=!0))},[P.value]),we=x.useCallback(()=>N==null?void 0:N.focus(),[N]),ye=x.useCallback((Z,me,de)=>{const _e=!Ee.current&&!de;(P.value!==void 0&&P.value===me||_e)&&ee(Z)},[P.value]),pe=s==="popper"?Kd:iw,ge=pe===Kd?{side:d,sideOffset:h,align:m,alignOffset:g,arrowPadding:y,collisionBoundary:C,collisionPadding:k,sticky:E,hideWhenDetached:v,avoidCollisions:S}:{};return b.jsx(ow,{scope:r,content:N,viewport:D,onViewportChange:V,itemRefCallback:W,selectedItem:U,onItemLeave:we,itemTextRefCallback:ye,focusSelectedItem:se,selectedItemText:re,position:s,isPositioned:ve,searchRef:z,children:b.jsx(Y0,{as:_T,allowPinchZoom:!0,children:b.jsx(h0,{asChild:!0,trapped:P.open,onMountAutoFocus:Z=>{Z.preventDefault()},onUnmountAutoFocus:Xe(a,Z=>{var me;(me=P.trigger)==null||me.focus({preventScroll:!0}),Z.preventDefault()}),children:b.jsx(d0,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:Z=>Z.preventDefault(),onDismiss:()=>P.onOpenChange(!1),children:b.jsx(pe,{role:"listbox",id:P.contentId,"data-state":P.open?"open":"closed",dir:P.dir,onContextMenu:Z=>Z.preventDefault(),...R,...ge,onPlaced:()=>ue(!0),ref:H,style:{display:"flex",flexDirection:"column",outline:"none",...R.style},onKeyDown:Xe(R.onKeyDown,Z=>{const me=Z.ctrlKey||Z.altKey||Z.metaKey;if(Z.key==="Tab"&&Z.preventDefault(),!me&&Z.key.length===1&&L(Z.key),["ArrowUp","ArrowDown","Home","End"].includes(Z.key)){let _e=he().filter(Ne=>!Ne.disabled).map(Ne=>Ne.ref.current);if(["ArrowUp","End"].includes(Z.key)&&(_e=_e.slice().reverse()),["ArrowUp","ArrowDown"].includes(Z.key)){const Ne=Z.target,Te=_e.indexOf(Ne);_e=_e.slice(Te+1)}setTimeout(()=>J(_e)),Z.preventDefault()}})})})})})})});sw.displayName=kT;var RT="SelectItemAlignedPosition",iw=x.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:s,...a}=e,l=Ir(go,r),u=Mr(go,r),[d,h]=x.useState(null),[m,g]=x.useState(null),y=rt(t,H=>g(H)),C=Wl(r),k=x.useRef(!1),E=x.useRef(!0),{viewport:v,selectedItem:S,selectedItemText:R,focusSelectedItem:P}=u,N=x.useCallback(()=>{if(l.trigger&&l.valueNode&&d&&m&&v&&S&&R){const H=l.trigger.getBoundingClientRect(),U=m.getBoundingClientRect(),X=l.valueNode.getBoundingClientRect(),re=R.getBoundingClientRect();if(l.dir!=="rtl"){const Ne=re.left-U.left,Te=X.left-Ne,Ke=H.left-Te,ot=H.width+Ke,Kn=Math.max(ot,U.width),Qn=window.innerWidth-cn,An=qg(Te,[cn,Math.max(cn,Qn-Kn)]);d.style.minWidth=ot+"px",d.style.left=An+"px"}else{const Ne=U.right-re.right,Te=window.innerWidth-X.right-Ne,Ke=window.innerWidth-H.right-Te,ot=H.width+Ke,Kn=Math.max(ot,U.width),Qn=window.innerWidth-cn,An=qg(Te,[cn,Math.max(cn,Qn-Kn)]);d.style.minWidth=ot+"px",d.style.right=An+"px"}const ee=C(),he=window.innerHeight-cn*2,ve=v.scrollHeight,ue=window.getComputedStyle(m),Ee=parseInt(ue.borderTopWidth,10),J=parseInt(ue.paddingTop,10),se=parseInt(ue.borderBottomWidth,10),$=parseInt(ue.paddingBottom,10),G=Ee+J+ve+$+se,z=Math.min(S.offsetHeight*5,G),L=window.getComputedStyle(v),W=parseInt(L.paddingTop,10),we=parseInt(L.paddingBottom,10),ye=H.top+H.height/2-cn,pe=he-ye,ge=S.offsetHeight/2,Z=S.offsetTop+ge,me=Ee+J+Z,de=G-me;if(me<=ye){const Ne=ee.length>0&&S===ee[ee.length-1].ref.current;d.style.bottom="0px";const Te=m.clientHeight-v.offsetTop-v.offsetHeight,Ke=Math.max(pe,ge+(Ne?we:0)+Te+se),ot=me+Ke;d.style.height=ot+"px"}else{const Ne=ee.length>0&&S===ee[0].ref.current;d.style.top="0px";const Ke=Math.max(ye,Ee+v.offsetTop+(Ne?W:0)+ge)+de;d.style.height=Ke+"px",v.scrollTop=me-ye+v.offsetTop}d.style.margin=`${cn}px 0`,d.style.minHeight=z+"px",d.style.maxHeight=he+"px",s==null||s(),requestAnimationFrame(()=>k.current=!0)}},[C,l.trigger,l.valueNode,d,m,v,S,R,l.dir,s]);Et(()=>N(),[N]);const[A,D]=x.useState();Et(()=>{m&&D(window.getComputedStyle(m).zIndex)},[m]);const V=x.useCallback(H=>{H&&E.current===!0&&(N(),P==null||P(),E.current=!1)},[N,P]);return b.jsx(PT,{scope:r,contentWrapper:d,shouldExpandOnScrollRef:k,onScrollButtonChange:V,children:b.jsx("div",{ref:h,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:b.jsx(He.div,{...a,ref:y,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});iw.displayName=RT;var NT="SelectPopperPosition",Kd=x.forwardRef((e,t)=>{const{__scopeSelect:r,align:s="start",collisionPadding:a=cn,...l}=e,u=ql(r);return b.jsx(yP,{...u,...l,ref:t,align:s,collisionPadding:a,style:{boxSizing:"border-box",...l.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Kd.displayName=NT;var[PT,Lf]=ys(go,{}),Qd="SelectViewport",aw=x.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:s,...a}=e,l=Mr(Qd,r),u=Lf(Qd,r),d=rt(t,l.onViewportChange),h=x.useRef(0);return b.jsxs(b.Fragment,{children:[b.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),b.jsx(Hl.Slot,{scope:r,children:b.jsx(He.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:Xe(a.onScroll,m=>{const g=m.currentTarget,{contentWrapper:y,shouldExpandOnScrollRef:C}=u;if(C!=null&&C.current&&y){const k=Math.abs(h.current-g.scrollTop);if(k>0){const E=window.innerHeight-cn*2,v=parseFloat(y.style.minHeight),S=parseFloat(y.style.height),R=Math.max(v,S);if(R0?A:0,y.style.justifyContent="flex-end")}}}h.current=g.scrollTop})})})]})});aw.displayName=Qd;var lw="SelectGroup",[TT,AT]=ys(lw),OT=x.forwardRef((e,t)=>{const{__scopeSelect:r,...s}=e,a=kf();return b.jsx(TT,{scope:r,id:a,children:b.jsx(He.div,{role:"group","aria-labelledby":a,...s,ref:t})})});OT.displayName=lw;var cw="SelectLabel",uw=x.forwardRef((e,t)=>{const{__scopeSelect:r,...s}=e,a=AT(cw,r);return b.jsx(He.div,{id:a.id,...s,ref:t})});uw.displayName=cw;var Rl="SelectItem",[jT,dw]=ys(Rl),fw=x.forwardRef((e,t)=>{const{__scopeSelect:r,value:s,disabled:a=!1,textValue:l,...u}=e,d=Ir(Rl,r),h=Mr(Rl,r),m=d.value===s,[g,y]=x.useState(l??""),[C,k]=x.useState(!1),E=rt(t,P=>{var N;return(N=h.itemRefCallback)==null?void 0:N.call(h,P,s,a)}),v=kf(),S=x.useRef("touch"),R=()=>{a||(d.onValueChange(s),d.onOpenChange(!1))};if(s==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return b.jsx(jT,{scope:r,value:s,disabled:a,textId:v,isSelected:m,onItemTextChange:x.useCallback(P=>{y(N=>N||((P==null?void 0:P.textContent)??"").trim())},[]),children:b.jsx(Hl.ItemSlot,{scope:r,value:s,disabled:a,textValue:g,children:b.jsx(He.div,{role:"option","aria-labelledby":v,"data-highlighted":C?"":void 0,"aria-selected":m&&C,"data-state":m?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...u,ref:E,onFocus:Xe(u.onFocus,()=>k(!0)),onBlur:Xe(u.onBlur,()=>k(!1)),onClick:Xe(u.onClick,()=>{S.current!=="mouse"&&R()}),onPointerUp:Xe(u.onPointerUp,()=>{S.current==="mouse"&&R()}),onPointerDown:Xe(u.onPointerDown,P=>{S.current=P.pointerType}),onPointerMove:Xe(u.onPointerMove,P=>{var N;S.current=P.pointerType,a?(N=h.onItemLeave)==null||N.call(h):S.current==="mouse"&&P.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Xe(u.onPointerLeave,P=>{var N;P.currentTarget===document.activeElement&&((N=h.onItemLeave)==null||N.call(h))}),onKeyDown:Xe(u.onKeyDown,P=>{var A;((A=h.searchRef)==null?void 0:A.current)!==""&&P.key===" "||(vT.includes(P.key)&&R(),P.key===" "&&P.preventDefault())})})})})});fw.displayName=Rl;var fi="SelectItemText",hw=x.forwardRef((e,t)=>{const{__scopeSelect:r,className:s,style:a,...l}=e,u=Ir(fi,r),d=Mr(fi,r),h=dw(fi,r),m=ST(fi,r),[g,y]=x.useState(null),C=rt(t,R=>y(R),h.onItemTextChange,R=>{var P;return(P=d.itemTextRefCallback)==null?void 0:P.call(d,R,h.value,h.disabled)}),k=g==null?void 0:g.textContent,E=x.useMemo(()=>b.jsx("option",{value:h.value,disabled:h.disabled,children:k},h.value),[h.disabled,h.value,k]),{onNativeOptionAdd:v,onNativeOptionRemove:S}=m;return Et(()=>(v(E),()=>S(E)),[v,S,E]),b.jsxs(b.Fragment,{children:[b.jsx(He.span,{id:h.textId,...l,ref:C}),h.isSelected&&u.valueNode&&!u.valueNodeHasChildren?Ri.createPortal(l.children,u.valueNode):null]})});hw.displayName=fi;var pw="SelectItemIndicator",mw=x.forwardRef((e,t)=>{const{__scopeSelect:r,...s}=e;return dw(pw,r).isSelected?b.jsx(He.span,{"aria-hidden":!0,...s,ref:t}):null});mw.displayName=pw;var Yd="SelectScrollUpButton",gw=x.forwardRef((e,t)=>{const r=Mr(Yd,e.__scopeSelect),s=Lf(Yd,e.__scopeSelect),[a,l]=x.useState(!1),u=rt(t,s.onScrollButtonChange);return Et(()=>{if(r.viewport&&r.isPositioned){let d=function(){const m=h.scrollTop>0;l(m)};const h=r.viewport;return d(),h.addEventListener("scroll",d),()=>h.removeEventListener("scroll",d)}},[r.viewport,r.isPositioned]),a?b.jsx(vw,{...e,ref:u,onAutoScroll:()=>{const{viewport:d,selectedItem:h}=r;d&&h&&(d.scrollTop=d.scrollTop-h.offsetHeight)}}):null});gw.displayName=Yd;var Xd="SelectScrollDownButton",yw=x.forwardRef((e,t)=>{const r=Mr(Xd,e.__scopeSelect),s=Lf(Xd,e.__scopeSelect),[a,l]=x.useState(!1),u=rt(t,s.onScrollButtonChange);return Et(()=>{if(r.viewport&&r.isPositioned){let d=function(){const m=h.scrollHeight-h.clientHeight,g=Math.ceil(h.scrollTop)h.removeEventListener("scroll",d)}},[r.viewport,r.isPositioned]),a?b.jsx(vw,{...e,ref:u,onAutoScroll:()=>{const{viewport:d,selectedItem:h}=r;d&&h&&(d.scrollTop=d.scrollTop+h.offsetHeight)}}):null});yw.displayName=Xd;var vw=x.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:s,...a}=e,l=Mr("SelectScrollButton",r),u=x.useRef(null),d=Wl(r),h=x.useCallback(()=>{u.current!==null&&(window.clearInterval(u.current),u.current=null)},[]);return x.useEffect(()=>()=>h(),[h]),Et(()=>{var g;const m=d().find(y=>y.ref.current===document.activeElement);(g=m==null?void 0:m.ref.current)==null||g.scrollIntoView({block:"nearest"})},[d]),b.jsx(He.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:Xe(a.onPointerDown,()=>{u.current===null&&(u.current=window.setInterval(s,50))}),onPointerMove:Xe(a.onPointerMove,()=>{var m;(m=l.onItemLeave)==null||m.call(l),u.current===null&&(u.current=window.setInterval(s,50))}),onPointerLeave:Xe(a.onPointerLeave,()=>{h()})})}),LT="SelectSeparator",ww=x.forwardRef((e,t)=>{const{__scopeSelect:r,...s}=e;return b.jsx(He.div,{"aria-hidden":!0,...s,ref:t})});ww.displayName=LT;var Gd="SelectArrow",IT=x.forwardRef((e,t)=>{const{__scopeSelect:r,...s}=e,a=ql(r),l=Ir(Gd,r),u=Mr(Gd,r);return l.open&&u.position==="popper"?b.jsx(vP,{...a,...s,ref:t}):null});IT.displayName=Gd;var MT="SelectBubbleInput",xw=x.forwardRef(({__scopeSelect:e,value:t,...r},s)=>{const a=x.useRef(null),l=rt(s,a),u=U0(t);return x.useEffect(()=>{const d=a.current;if(!d)return;const h=window.HTMLSelectElement.prototype,g=Object.getOwnPropertyDescriptor(h,"value").set;if(u!==t&&g){const y=new Event("change",{bubbles:!0});g.call(d,t),d.dispatchEvent(y)}},[u,t]),b.jsx(He.select,{...r,style:{...B0,...r.style},ref:l,defaultValue:t})});xw.displayName=MT;function bw(e){return e===""||e===void 0}function Sw(e){const t=ho(e),r=x.useRef(""),s=x.useRef(0),a=x.useCallback(u=>{const d=r.current+u;t(d),(function h(m){r.current=m,window.clearTimeout(s.current),m!==""&&(s.current=window.setTimeout(()=>h(""),1e3))})(d)},[t]),l=x.useCallback(()=>{r.current="",window.clearTimeout(s.current)},[]);return x.useEffect(()=>()=>window.clearTimeout(s.current),[]),[r,a,l]}function Ew(e,t,r){const a=t.length>1&&Array.from(t).every(m=>m===t[0])?t[0]:t,l=r?e.indexOf(r):-1;let u=DT(e,Math.max(l,0));a.length===1&&(u=u.filter(m=>m!==r));const h=u.find(m=>m.textValue.toLowerCase().startsWith(a.toLowerCase()));return h!==r?h:void 0}function DT(e,t){return e.map((r,s)=>e[(t+s)%e.length])}var FT=X0,Cw=J0,UT=ew,BT=tw,zT=nw,kw=rw,$T=aw,_w=uw,Rw=fw,VT=hw,HT=mw,Nw=gw,Pw=yw,Tw=ww;const WT=FT,qT=UT,Aw=x.forwardRef(({className:e,children:t,...r},s)=>b.jsxs(Cw,{ref:s,className:ft("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[t,b.jsx(BT,{asChild:!0,children:b.jsx(My,{className:"h-4 w-4 opacity-50"})})]}));Aw.displayName=Cw.displayName;const Ow=x.forwardRef(({className:e,...t},r)=>b.jsx(Nw,{ref:r,className:ft("flex cursor-default items-center justify-center py-1",e),...t,children:b.jsx(xb,{className:"h-4 w-4"})}));Ow.displayName=Nw.displayName;const jw=x.forwardRef(({className:e,...t},r)=>b.jsx(Pw,{ref:r,className:ft("flex cursor-default items-center justify-center py-1",e),...t,children:b.jsx(My,{className:"h-4 w-4"})}));jw.displayName=Pw.displayName;const Lw=x.forwardRef(({className:e,children:t,position:r="popper",...s},a)=>b.jsx(zT,{children:b.jsxs(kw,{ref:a,className:ft("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...s,children:[b.jsx(Ow,{}),b.jsx($T,{className:ft("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),b.jsx(jw,{})]})}));Lw.displayName=kw.displayName;const KT=x.forwardRef(({className:e,...t},r)=>b.jsx(_w,{ref:r,className:ft("px-2 py-1.5 text-sm font-semibold",e),...t}));KT.displayName=_w.displayName;const Iw=x.forwardRef(({className:e,children:t,...r},s)=>b.jsxs(Rw,{ref:s,className:ft("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[b.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:b.jsx(HT,{children:b.jsx(Iy,{className:"h-4 w-4"})})}),b.jsx(VT,{children:t})]}));Iw.displayName=Rw.displayName;const QT=x.forwardRef(({className:e,...t},r)=>b.jsx(Tw,{ref:r,className:ft("-mx-1 my-1 h-px bg-muted",e),...t}));QT.displayName=Tw.displayName;function YT(e,t){return x.useReducer((r,s)=>t[r][s]??r,e)}var Mw=e=>{const{present:t,children:r}=e,s=XT(t),a=typeof r=="function"?r({present:s.isPresent}):x.Children.only(r),l=rt(s.ref,GT(a));return typeof r=="function"||s.isPresent?x.cloneElement(a,{ref:l}):null};Mw.displayName="Presence";function XT(e){const[t,r]=x.useState(),s=x.useRef(null),a=x.useRef(e),l=x.useRef("none"),u=e?"mounted":"unmounted",[d,h]=YT(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const m=sl(s.current);l.current=d==="mounted"?m:"none"},[d]),Et(()=>{const m=s.current,g=a.current;if(g!==e){const C=l.current,k=sl(m);e?h("MOUNT"):k==="none"||(m==null?void 0:m.display)==="none"?h("UNMOUNT"):h(g&&C!==k?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,h]),Et(()=>{if(t){let m;const g=t.ownerDocument.defaultView??window,y=k=>{const v=sl(s.current).includes(CSS.escape(k.animationName));if(k.target===t&&v&&(h("ANIMATION_END"),!a.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",m=g.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},C=k=>{k.target===t&&(l.current=sl(s.current))};return t.addEventListener("animationstart",C),t.addEventListener("animationcancel",y),t.addEventListener("animationend",y),()=>{g.clearTimeout(m),t.removeEventListener("animationstart",C),t.removeEventListener("animationcancel",y),t.removeEventListener("animationend",y)}}else h("ANIMATION_END")},[t,h]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:x.useCallback(m=>{s.current=m?getComputedStyle(m):null,r(m)},[])}}function sl(e){return(e==null?void 0:e.animationName)||"none"}function GT(e){var s,a;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Kl="Checkbox",[JT]=Fl(Kl),[ZT,If]=JT(Kl);function eA(e){const{__scopeCheckbox:t,checked:r,children:s,defaultChecked:a,disabled:l,form:u,name:d,onCheckedChange:h,required:m,value:g="on",internal_do_not_use_render:y}=e,[C,k]=Wd({prop:r,defaultProp:a??!1,onChange:h,caller:Kl}),[E,v]=x.useState(null),[S,R]=x.useState(null),P=x.useRef(!1),N=E?!!u||!!E.closest("form"):!0,A={checked:C,disabled:l,setChecked:k,control:E,setControl:v,name:d,form:u,value:g,hasConsumerStoppedPropagationRef:P,required:m,defaultChecked:Ar(a)?!1:a,isFormControl:N,bubbleInput:S,setBubbleInput:R};return b.jsx(ZT,{scope:t,...A,children:tA(y)?y(A):s})}var Dw="CheckboxTrigger",Fw=x.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...s},a)=>{const{control:l,value:u,disabled:d,checked:h,required:m,setControl:g,setChecked:y,hasConsumerStoppedPropagationRef:C,isFormControl:k,bubbleInput:E}=If(Dw,e),v=rt(a,g),S=x.useRef(h);return x.useEffect(()=>{const R=l==null?void 0:l.form;if(R){const P=()=>y(S.current);return R.addEventListener("reset",P),()=>R.removeEventListener("reset",P)}},[l,y]),b.jsx(He.button,{type:"button",role:"checkbox","aria-checked":Ar(h)?"mixed":h,"aria-required":m,"data-state":Vw(h),"data-disabled":d?"":void 0,disabled:d,value:u,...s,ref:v,onKeyDown:Xe(t,R=>{R.key==="Enter"&&R.preventDefault()}),onClick:Xe(r,R=>{y(P=>Ar(P)?!0:!P),E&&k&&(C.current=R.isPropagationStopped(),C.current||R.stopPropagation())})})});Fw.displayName=Dw;var Mf=x.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:s,checked:a,defaultChecked:l,required:u,disabled:d,value:h,onCheckedChange:m,form:g,...y}=e;return b.jsx(eA,{__scopeCheckbox:r,checked:a,defaultChecked:l,disabled:d,required:u,onCheckedChange:m,name:s,form:g,value:h,internal_do_not_use_render:({isFormControl:C})=>b.jsxs(b.Fragment,{children:[b.jsx(Fw,{...y,ref:t,__scopeCheckbox:r}),C&&b.jsx($w,{__scopeCheckbox:r})]})})});Mf.displayName=Kl;var Uw="CheckboxIndicator",Bw=x.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:s,...a}=e,l=If(Uw,r);return b.jsx(Mw,{present:s||Ar(l.checked)||l.checked===!0,children:b.jsx(He.span,{"data-state":Vw(l.checked),"data-disabled":l.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});Bw.displayName=Uw;var zw="CheckboxBubbleInput",$w=x.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:s,hasConsumerStoppedPropagationRef:a,checked:l,defaultChecked:u,required:d,disabled:h,name:m,value:g,form:y,bubbleInput:C,setBubbleInput:k}=If(zw,e),E=rt(r,k),v=U0(l),S=R0(s);x.useEffect(()=>{const P=C;if(!P)return;const N=window.HTMLInputElement.prototype,D=Object.getOwnPropertyDescriptor(N,"checked").set,V=!a.current;if(v!==l&&D){const H=new Event("click",{bubbles:V});P.indeterminate=Ar(l),D.call(P,Ar(l)?!1:l),P.dispatchEvent(H)}},[C,v,l,a]);const R=x.useRef(Ar(l)?!1:l);return b.jsx(He.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??R.current,required:d,disabled:h,name:m,value:g,form:y,...t,tabIndex:-1,ref:E,style:{...t.style,...S,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});$w.displayName=zw;function tA(e){return typeof e=="function"}function Ar(e){return e==="indeterminate"}function Vw(e){return Ar(e)?"indeterminate":e?"checked":"unchecked"}const Hw=x.forwardRef(({className:e,...t},r)=>b.jsx(Mf,{ref:r,className:ft("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:b.jsx(Bw,{className:ft("flex items-center justify-center text-current"),children:b.jsx(Iy,{className:"h-4 w-4"})})}));Hw.displayName=Mf.displayName;var nA=Symbol.for("react.lazy"),Nl=Pl[" use ".trim().toString()];function rA(e){return typeof e=="object"&&e!==null&&"then"in e}function Ww(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===nA&&"_payload"in e&&rA(e._payload)}function oA(e){const t=sA(e),r=x.forwardRef((s,a)=>{let{children:l,...u}=s;Ww(l)&&typeof Nl=="function"&&(l=Nl(l._payload));const d=x.Children.toArray(l),h=d.find(aA);if(h){const m=h.props.children,g=d.map(y=>y===h?x.Children.count(m)>1?x.Children.only(null):x.isValidElement(m)?m.props.children:null:y);return b.jsx(t,{...u,ref:a,children:x.isValidElement(m)?x.cloneElement(m,void 0,g):null})}return b.jsx(t,{...u,ref:a,children:l})});return r.displayName=`${e}.Slot`,r}function sA(e){const t=x.forwardRef((r,s)=>{let{children:a,...l}=r;if(Ww(a)&&typeof Nl=="function"&&(a=Nl(a._payload)),x.isValidElement(a)){const u=cA(a),d=lA(l,a.props);return a.type!==x.Fragment&&(d.ref=s?Ii(s,u):u),x.cloneElement(a,d)}return x.Children.count(a)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var iA=Symbol("radix.slottable");function aA(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===iA}function lA(e,t){const r={...t};for(const s in t){const a=e[s],l=t[s];/^on[A-Z]/.test(s)?a&&l?r[s]=(...d)=>{const h=l(...d);return a(...d),h}:a&&(r[s]=a):s==="style"?r[s]={...a,...l}:s==="className"&&(r[s]=[a,l].filter(Boolean).join(" "))}return{...e,...r}}function cA(e){var s,a;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var uA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],dA=uA.reduce((e,t)=>{const r=oA(`Primitive.${t}`),s=x.forwardRef((a,l)=>{const{asChild:u,...d}=a,h=u?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(h,{...d,ref:l})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{}),fA="Label",qw=x.forwardRef((e,t)=>b.jsx(dA.label,{...e,ref:t,onMouseDown:r=>{var a;r.target.closest("button, input, select, textarea")||((a=e.onMouseDown)==null||a.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));qw.displayName=fA;var Kw=qw;const hA=Oy("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Yo=x.forwardRef(({className:e,...t},r)=>b.jsx(Kw,{ref:r,className:ft(hA(),e),...t}));Yo.displayName=Kw.displayName;function pA(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Array(12).fill(0);let Jd=1;class mA{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const r=this.subscribers.indexOf(t);this.subscribers.splice(r,1)}),this.publish=t=>{this.subscribers.forEach(r=>r(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var r;const{message:s,...a}=t,l=typeof(t==null?void 0:t.id)=="number"||((r=t.id)==null?void 0:r.length)>0?t.id:Jd++,u=this.toasts.find(h=>h.id===l),d=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(l)&&this.dismissedToasts.delete(l),u?this.toasts=this.toasts.map(h=>h.id===l?(this.publish({...h,...t,id:l,title:s}),{...h,...t,id:l,dismissible:d,title:s}):h):this.addToast({title:s,...a,dismissible:d,id:l}),l},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:t,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(s=>s({id:r.id,dismiss:!0}))}),t),this.message=(t,r)=>this.create({...r,message:t}),this.error=(t,r)=>this.create({...r,message:t,type:"error"}),this.success=(t,r)=>this.create({...r,type:"success",message:t}),this.info=(t,r)=>this.create({...r,type:"info",message:t}),this.warning=(t,r)=>this.create({...r,type:"warning",message:t}),this.loading=(t,r)=>this.create({...r,type:"loading",message:t}),this.promise=(t,r)=>{if(!r)return;let s;r.loading!==void 0&&(s=this.create({...r,promise:t,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const a=Promise.resolve(t instanceof Function?t():t);let l=s!==void 0,u;const d=a.then(async m=>{if(u=["resolve",m],zt.isValidElement(m))l=!1,this.create({id:s,type:"default",message:m});else if(yA(m)&&!m.ok){l=!1;const y=typeof r.error=="function"?await r.error(`HTTP error! status: ${m.status}`):r.error,C=typeof r.description=="function"?await r.description(`HTTP error! status: ${m.status}`):r.description,E=typeof y=="object"&&!zt.isValidElement(y)?y:{message:y};this.create({id:s,type:"error",description:C,...E})}else if(m instanceof Error){l=!1;const y=typeof r.error=="function"?await r.error(m):r.error,C=typeof r.description=="function"?await r.description(m):r.description,E=typeof y=="object"&&!zt.isValidElement(y)?y:{message:y};this.create({id:s,type:"error",description:C,...E})}else if(r.success!==void 0){l=!1;const y=typeof r.success=="function"?await r.success(m):r.success,C=typeof r.description=="function"?await r.description(m):r.description,E=typeof y=="object"&&!zt.isValidElement(y)?y:{message:y};this.create({id:s,type:"success",description:C,...E})}}).catch(async m=>{if(u=["reject",m],r.error!==void 0){l=!1;const g=typeof r.error=="function"?await r.error(m):r.error,y=typeof r.description=="function"?await r.description(m):r.description,k=typeof g=="object"&&!zt.isValidElement(g)?g:{message:g};this.create({id:s,type:"error",description:y,...k})}}).finally(()=>{l&&(this.dismiss(s),s=void 0),r.finally==null||r.finally.call(r)}),h=()=>new Promise((m,g)=>d.then(()=>u[0]==="reject"?g(u[1]):m(u[1])).catch(g));return typeof s!="string"&&typeof s!="number"?{unwrap:h}:Object.assign(s,{unwrap:h})},this.custom=(t,r)=>{const s=(r==null?void 0:r.id)||Jd++;return this.create({jsx:t(s),id:s,...r}),s},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Gt=new mA,gA=(e,t)=>{const r=(t==null?void 0:t.id)||Jd++;return Gt.addToast({title:e,...t,id:r}),r},yA=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",vA=gA,wA=()=>Gt.toasts,xA=()=>Gt.getActiveToasts(),bA=Object.assign(vA,{success:Gt.success,info:Gt.info,warning:Gt.warning,error:Gt.error,custom:Gt.custom,message:Gt.message,promise:Gt.promise,dismiss:Gt.dismiss,loading:Gt.loading},{getHistory:wA,getToasts:xA});pA("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");const SA=["Fraud / Financial Misconduct","Regulatory Violation (CMA/CBK/Ministry)","Shari'a Non-Compliance","Conflict of Interest","Harassment / Workplace Misconduct","Health, Safety, or Environmental","Other"];function EA(){const[e,t]=x.useState({reporter_name:"",reporter_email:"",concern_type:"",description:"",consent:!1}),[r,s]=x.useState(null),[a,l]=x.useState(!1),[u,d]=x.useState(!1),h=async m=>{if(m.preventDefault(),!e.concern_type||!e.description||!e.consent){bA.error("Please fill in all required fields and confirm the declaration.");return}l(!0);let g="";r&&(g=(await Zr.integrations.Core.UploadFile({file:r})).file_url),await Zr.entities.ConcernReport.create({reporter_name:e.reporter_name||void 0,reporter_email:e.reporter_email||void 0,concern_type:e.concern_type,description:e.description,file_url:g||void 0,status:"submitted"}),l(!1),d(!0)};return u?b.jsx("section",{className:"bg-background py-12 md:py-16 px-6",children:b.jsxs("div",{className:"max-w-[800px] mx-auto text-center",children:[b.jsx("div",{className:"w-16 h-16 rounded-full bg-green-50 flex items-center justify-center mx-auto mb-6",children:b.jsx(Sb,{className:"w-8 h-8 text-green-600"})}),b.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-navy mb-3",children:"Report Submitted"}),b.jsx("p",{className:"text-muted-foreground text-[15px] max-w-md mx-auto leading-relaxed",children:"Your concern has been received and will be reviewed confidentially by authorized personnel. If you provided contact details, we may follow up with you."})]})}):b.jsx("section",{className:"bg-background py-12 md:py-16 px-6",children:b.jsxs("div",{className:"max-w-[800px] mx-auto",children:[b.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-navy mb-2",children:"Report a Concern"}),b.jsx("div",{className:"w-12 h-[2px] bg-gold mb-4"}),b.jsxs("div",{className:"flex items-center gap-2 mb-8",children:[b.jsx(Dy,{className:"w-4 h-4 text-gold"}),b.jsx("p",{className:"text-sm text-muted-foreground",children:"You may report anonymously. All information is kept strictly confidential."})]}),b.jsxs("form",{onSubmit:h,className:"space-y-6",children:[b.jsxs("div",{className:"space-y-2",children:[b.jsxs(Yo,{className:"text-sm font-medium text-foreground",children:["Name ",b.jsx("span",{className:"text-muted-foreground font-normal",children:"(Optional — for follow-up)"})]}),b.jsx(Bd,{placeholder:"Or leave blank to remain anonymous",value:e.reporter_name,onChange:m=>t({...e,reporter_name:m.target.value}),className:"h-11 border-border focus:border-gold focus:ring-gold/20"})]}),b.jsxs("div",{className:"space-y-2",children:[b.jsxs(Yo,{className:"text-sm font-medium text-foreground",children:["Email ",b.jsx("span",{className:"text-muted-foreground font-normal",children:"(Optional — for follow-up)"})]}),b.jsx(Bd,{type:"email",placeholder:"Or leave blank to remain anonymous",value:e.reporter_email,onChange:m=>t({...e,reporter_email:m.target.value}),className:"h-11 border-border focus:border-gold focus:ring-gold/20"})]}),b.jsxs("div",{className:"space-y-2",children:[b.jsxs(Yo,{className:"text-sm font-medium text-foreground",children:["Type of Concern ",b.jsx("span",{className:"text-destructive",children:"*"})]}),b.jsxs(WT,{value:e.concern_type,onValueChange:m=>t({...e,concern_type:m}),children:[b.jsx(Aw,{className:"h-11 border-border focus:border-gold focus:ring-gold/20",children:b.jsx(qT,{placeholder:"Select a category"})}),b.jsx(Lw,{children:SA.map(m=>b.jsx(Iw,{value:m,children:m},m))})]})]}),b.jsxs("div",{className:"space-y-2",children:[b.jsxs(Yo,{className:"text-sm font-medium text-foreground",children:["Description of Concern ",b.jsx("span",{className:"text-destructive",children:"*"})]}),b.jsx(c0,{rows:8,placeholder:"Please provide as much detail as possible, including dates, individuals involved, and any supporting evidence.",value:e.description,onChange:m=>t({...e,description:m.target.value}),className:"border-border focus:border-gold focus:ring-gold/20 resize-none"})]}),b.jsxs("div",{className:"space-y-2",children:[b.jsxs(Yo,{className:"text-sm font-medium text-foreground",children:["Supporting Documentation ",b.jsx("span",{className:"text-muted-foreground font-normal",children:"(Optional)"})]}),b.jsx("div",{className:"relative",children:b.jsxs("label",{className:"flex items-center gap-3 p-4 border border-dashed border-border rounded-lg cursor-pointer hover:border-gold/50 transition-colors bg-secondary/50",children:[b.jsx(uS,{className:"w-5 h-5 text-muted-foreground"}),b.jsxs("div",{children:[b.jsx("p",{className:"text-sm text-foreground",children:r?r.name:"Click to upload a file"}),b.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Maximum 10MB — PDF, DOC, DOCX, JPG, PNG"})]}),b.jsx("input",{type:"file",className:"hidden",accept:".pdf,.doc,.docx,.jpg,.jpeg,.png",onChange:m=>{var g;return s(((g=m.target.files)==null?void 0:g[0])||null)}})]})})]}),b.jsxs("div",{className:"flex items-start gap-3 p-4 bg-secondary/50 rounded-lg border border-border/60",children:[b.jsx(Hw,{checked:e.consent,onCheckedChange:m=>t({...e,consent:!!m}),className:"mt-0.5 data-[state=checked]:bg-gold data-[state=checked]:border-gold"}),b.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:"I confirm that the information provided is accurate to the best of my knowledge. I understand that Almanza will investigate this matter confidentially."})]}),b.jsx("button",{type:"submit",disabled:a,className:"w-full sm:w-auto bg-gold hover:bg-gold/90 text-white font-semibold px-8 py-3 rounded-md transition-all hover:scale-[1.02] active:scale-[0.98] disabled:opacity-60 disabled:cursor-not-allowed flex items-center justify-center gap-2",children:a?b.jsxs(b.Fragment,{children:[b.jsx(Hb,{className:"w-4 h-4 animate-spin"}),"Submitting..."]}):b.jsxs(b.Fragment,{children:["Submit Confidential Report",b.jsx(Ly,{className:"w-4 h-4"})]})})]})]})})}const CA=[{icon:db,title:"Financial & Fraud",examples:"Embezzlement, false accounting, bribery, kickbacks"},{icon:Tb,title:"Regulatory Violations",examples:"CMA Law No. 7/2010, CBK directives, Ministry of Commerce rules"},{icon:nf,title:"Shari'a Non-Compliance",examples:"Riba, gharar, investment in prohibited sectors"},{icon:of,title:"Workplace Conduct",examples:"Harassment, discrimination, retaliation"},{icon:Ob,title:"Conflicts of Interest",examples:"Undisclosed personal trading, related-party transactions"},{icon:Lb,title:"Health & Safety",examples:"Unsafe working conditions, environmental violations"}];function kA(){return b.jsx("section",{className:"bg-secondary py-12 md:py-16 px-6",children:b.jsxs("div",{className:"max-w-[1280px] mx-auto",children:[b.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-navy mb-2",children:"Types of Reportable Concerns"}),b.jsx("div",{className:"w-12 h-[2px] bg-gold mb-8"}),b.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:CA.map(({icon:e,title:t,examples:r})=>b.jsxs("div",{className:"bg-background border border-border/60 rounded-lg p-5 flex items-start gap-4",children:[b.jsx("div",{className:"w-10 h-10 rounded-lg bg-navy/5 flex items-center justify-center flex-shrink-0",children:b.jsx(e,{className:"w-5 h-5 text-navy"})}),b.jsxs("div",{children:[b.jsx("h3",{className:"text-[15px] font-semibold text-foreground",children:t}),b.jsx("p",{className:"text-sm text-muted-foreground mt-1 leading-relaxed",children:r})]})]},t))})]})})}const _A=[{icon:Dy,label:"Full Anonymity",desc:"Reports may be made without revealing your identity"},{icon:sS,label:"No Retaliation",desc:"Almanza prohibits retaliation against good-faith reporters"},{icon:_b,label:"Restricted Access",desc:"Limited to Compliance, Internal Audit, and Audit Committee"},{icon:fS,label:"Legal Protection",desc:"Whistleblowers are protected under Kuwaiti law"}];function RA(){return b.jsx("section",{className:"bg-background py-12 md:py-16 px-6",children:b.jsx("div",{className:"max-w-[900px] mx-auto",children:b.jsxs("div",{className:"border-t-2 border-gold pt-10",children:[b.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-navy mb-2",children:"Confidentiality & Whistleblower Protection"}),b.jsx("div",{className:"w-12 h-[2px] bg-gold mb-6"}),b.jsx("p",{className:"text-[15px] leading-relaxed text-muted-foreground mb-8",children:"Almanza guarantees strict confidentiality for all reports. Reports may be made anonymously. Almanza prohibits retaliation against any individual who makes a good-faith report. Whistleblowers are protected under Kuwaiti law and Al Amal's internal policies. Access to reports is limited to authorized personnel in Compliance, Internal Audit, and the Audit Committee of the Board of Directors."}),b.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 mb-8",children:_A.map(({icon:e,label:t,desc:r})=>b.jsxs("div",{className:"flex items-start gap-3 p-4 bg-secondary rounded-lg",children:[b.jsx(e,{className:"w-5 h-5 text-gold mt-0.5 flex-shrink-0"}),b.jsxs("div",{children:[b.jsx("p",{className:"text-sm font-semibold text-foreground",children:t}),b.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:r})]})]},t))}),b.jsxs("p",{className:"text-[15px] leading-relaxed text-muted-foreground",children:["Reports may also be made directly to the Audit Committee by contacting the Chair of the Audit Committee at"," ",b.jsx("a",{href:"mailto:auditcommittee@almanzainvestment.com",className:"text-blue-accent underline underline-offset-2 hover:text-navy transition-colors",children:"auditcommittee@almanzainvestment.com"}),"."]})]})})})}const NA=[{icon:gb,name:"Capital Markets Authority (CMA)",desc:"Kuwait — Primary licensing & supervision"},{icon:Bb,name:"Central Bank of Kuwait (CBK)",desc:"Banking & financial regulation"},{icon:pb,name:"Ministry of Commerce and Industry",desc:"Corporate governance & commercial law"},{icon:nf,name:"Shari'a Supervisory Board",desc:"Oversight of Shari'a compliance in all activities"}];function PA(){return b.jsx("section",{className:"bg-secondary py-12 md:py-16 px-6",children:b.jsxs("div",{className:"max-w-[900px] mx-auto",children:[b.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-navy mb-2",children:"Regulatory Oversight"}),b.jsx("div",{className:"w-12 h-[2px] bg-gold mb-6"}),b.jsxs("p",{className:"text-[15px] leading-relaxed text-muted-foreground mb-8",children:["Almanza operates under the supervision of the ",b.jsx("strong",{className:"text-foreground",children:"Capital Markets Authority (CMA) of Kuwait"}),", the ",b.jsx("strong",{className:"text-foreground",children:"Central Bank of Kuwait (CBK)"}),", and the"," ",b.jsx("strong",{className:"text-foreground",children:"Kuwait Ministry of Commerce and Industry"}),". Concerns regarding regulatory compliance may also be directed to these authorities. Our"," ",b.jsx("strong",{className:"text-foreground",children:"Shari'a Supervisory Board"})," oversees all Shari'a compliance matters."]}),b.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:NA.map(({icon:e,name:t,desc:r})=>b.jsxs("div",{className:"flex items-start gap-3 p-4 bg-background rounded-lg border border-border/60",children:[b.jsx(e,{className:"w-5 h-5 text-navy mt-0.5 flex-shrink-0"}),b.jsxs("div",{children:[b.jsx("p",{className:"text-sm font-semibold text-foreground",children:t}),b.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:r})]})]},t))})]})})}const TA=[{icon:nf,en:"Work & Spread Knowledge",ar:"العمل ونشر المعرفة"},{icon:Gb,en:"Persevere",ar:"المثابرة"},{icon:rf,en:"Act with Integrity",ar:"العمل بنزاهة"},{icon:Fb,en:"Maintain Ethics",ar:"الحفاظ على الأخلاق"},{icon:of,en:"Invest in People",ar:"الاستثمار في الأشخاص"}];function AA(){return b.jsx("section",{className:"bg-background py-16 px-6",children:b.jsxs("div",{className:"max-w-[1280px] mx-auto",children:[b.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-navy mb-2 text-center",children:"Our Core Values"}),b.jsx("div",{className:"w-12 h-[2px] bg-gold mx-auto mb-10"}),b.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-6",children:TA.map(({icon:e,en:t,ar:r})=>b.jsxs("div",{className:"text-center group",children:[b.jsx("div",{className:"w-14 h-14 rounded-full bg-navy/5 flex items-center justify-center mx-auto mb-4 group-hover:bg-gold/10 transition-colors",children:b.jsx(e,{className:"w-6 h-6 text-navy group-hover:text-gold transition-colors"})}),b.jsx("p",{className:"text-sm font-semibold text-foreground leading-tight",children:t}),b.jsx("p",{className:"text-sm font-tajawal text-muted-foreground mt-1",children:r})]},t))})]})})}const OA=[{icon:Nb,title:"Conflict of Interest Policy",desc:"Our policy on identifying and managing conflicts of interest across all business activities.",cta:"View Policy"},{icon:Cb,title:"Whistleblower Policy",desc:"Full policy on reporting concerns, investigation procedures, and protection for reporters.",cta:"Download PDF"}];function jA(){return b.jsx("section",{className:"bg-secondary py-12 md:py-16 px-6",children:b.jsxs("div",{className:"max-w-[1280px] mx-auto",children:[b.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-navy mb-2",children:"Related Policies"}),b.jsx("div",{className:"w-12 h-[2px] bg-gold mb-8"}),b.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:OA.map(({icon:e,title:t,desc:r,cta:s})=>b.jsxs("div",{className:"bg-background border border-border/60 rounded-lg p-6 flex flex-col justify-between hover:shadow-md transition-shadow",children:[b.jsxs("div",{children:[b.jsx("div",{className:"w-10 h-10 rounded-lg bg-navy/5 flex items-center justify-center mb-4",children:b.jsx(e,{className:"w-5 h-5 text-navy"})}),b.jsx("h3",{className:"text-lg font-semibold text-foreground mb-2",children:t}),b.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:r})]}),b.jsxs("button",{className:"mt-6 text-sm font-semibold text-gold flex items-center gap-1 hover:gap-2 transition-all",children:[s," ",b.jsx(Ly,{className:"w-4 h-4"})]})]},t))})]})})}const LA=[{icon:Kb,label:"Email",detail:"whistleblower@almanzainvestment.com",sub:"Confidential inbox — monitored by Compliance",href:"mailto:whistleblower@almanzainvestment.com"},{icon:Zb,label:"Phone",detail:"+965 XXX XXXX",sub:"Compliance Hotline — confidential",href:"tel:+965XXXXXXXX"},{icon:Yb,label:"Mail",detail:"Compliance Officer, Almanza Investment Company KSCC",sub:'Kuwait City, State of Kuwait — Marked "Confidential – Whistleblower"',href:null}];function IA(){return b.jsx("section",{className:"bg-background py-12 md:py-16 px-6",children:b.jsxs("div",{className:"max-w-[900px] mx-auto",children:[b.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-navy mb-2",children:"Alternative Ways to Report"}),b.jsx("div",{className:"w-12 h-[2px] bg-gold mb-4"}),b.jsx("p",{className:"text-[15px] text-muted-foreground mb-8",children:"If you prefer not to use the online form, you may report concerns by:"}),b.jsx("div",{className:"space-y-4",children:LA.map(({icon:e,label:t,detail:r,sub:s,href:a})=>b.jsxs("div",{className:"flex items-start gap-4 p-5 bg-secondary rounded-lg border border-border/60",children:[b.jsx("div",{className:"w-10 h-10 rounded-lg bg-gold/10 flex items-center justify-center flex-shrink-0",children:b.jsx(e,{className:"w-5 h-5 text-gold"})}),b.jsxs("div",{children:[b.jsx("p",{className:"text-sm font-semibold text-foreground",children:t}),a?b.jsx("a",{href:a,className:"text-sm text-blue-accent underline underline-offset-2 hover:text-navy transition-colors",children:r}):b.jsx("p",{className:"text-sm text-foreground",children:r}),b.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:s})]})]},t))})]})})}const MA=["Work & Spread Knowledge","Persevere","Act with Integrity","Maintain Ethics","Invest in People"],DA=["Almanza Real Estate","Almanza Capital Markets","Almanza Advisory","Almanza Asset Management"],FA=["Privacy Policy","Terms of Use","CMA Compliance","CBK Compliance"];function UA(){return b.jsxs("footer",{className:"bg-navy border-t-2 border-gold",children:[b.jsx("div",{className:"max-w-[1280px] mx-auto px-6 py-12 md:py-16",children:b.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-10",children:[b.jsxs("div",{children:[b.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[b.jsx(rf,{className:"w-6 h-6 text-gold"}),b.jsx("span",{className:"text-lg font-bold text-white tracking-tight",children:"ALMANZA"})]}),b.jsx("p",{className:"text-sm text-white/60 leading-relaxed mb-4",children:"Kuwaiti Shareholding Company, est. 1998. Your Preferred Partner in GCC."}),b.jsx("p",{className:"text-sm font-tajawal text-white/50",children:"شركة المنزع للاستثمار ش.م.ك"})]}),b.jsxs("div",{children:[b.jsx("h4",{className:"text-xs font-semibold text-gold uppercase tracking-widest mb-4",children:"Core Values"}),b.jsx("ul",{className:"space-y-2",children:MA.map(e=>b.jsx("li",{className:"text-sm text-white/60",children:e},e))})]}),b.jsxs("div",{children:[b.jsx("h4",{className:"text-xs font-semibold text-gold uppercase tracking-widest mb-4",children:"Subsidiary Companies"}),b.jsx("ul",{className:"space-y-2",children:DA.map(e=>b.jsx("li",{className:"text-sm text-white/60",children:e},e))})]}),b.jsxs("div",{children:[b.jsx("h4",{className:"text-xs font-semibold text-gold uppercase tracking-widest mb-4",children:"Legal & Compliance"}),b.jsx("ul",{className:"space-y-2",children:FA.map(e=>b.jsx("li",{className:"text-sm text-white/60 hover:text-white/80 cursor-pointer transition-colors",children:e},e))})]})]})}),b.jsx("div",{className:"border-t border-white/10 py-5 px-6",children:b.jsx("div",{className:"max-w-[1280px] mx-auto",children:b.jsx("p",{className:"text-xs text-white/40 text-center leading-relaxed",children:"© 2026 Almanza Investment Company KSCC. All rights reserved. All concerns are treated confidentially. Whistleblowers are protected from retaliation."})})})]})}function vy(){return b.jsxs("div",{className:"min-h-screen bg-background font-inter",children:[b.jsx(fN,{}),b.jsx(pN,{}),b.jsx(EA,{}),b.jsx(kA,{}),b.jsx(RA,{}),b.jsx(PA,{}),b.jsx(AA,{}),b.jsx(jA,{}),b.jsx(IA,{}),b.jsx(UA,{})]})}const BA=()=>{const{isLoadingAuth:e,isLoadingPublicSettings:t,authError:r,navigateToLogin:s}=uN();if(t||e)return b.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:b.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})});if(r){if(r.type==="user_not_registered")return b.jsx(dN,{});if(r.type==="auth_required")return s(),null}return b.jsxs(BC,{children:[b.jsx(ll,{path:"/",element:b.jsx(vy,{})}),b.jsx(ll,{path:"/contact-us/report-a-concern",element:b.jsx(vy,{})}),b.jsx(ll,{path:"*",element:b.jsx(lN,{})})]})};function zA(){return b.jsx(cN,{children:b.jsxs(jE,{client:qE,children:[b.jsx(KC,{children:b.jsx(BA,{})}),b.jsx(aE,{})]})})}Z1.createRoot(document.getElementById("root")).render(b.jsx(zA,{}));